📅  最后修改于: 2022-03-11 15:01:00.879000             🧑  作者: Mango
//To set the value:
int valueIWant = 5;
ui->tableWidget->cellWidget(0,2)->setProperty("value",valueIWant);"
//And to read the value:
int actualValue = ui->tableWidget->cellWidget(0,2)->property("value").value();