Just as a side node, the table widget does not emit any signals in case those are cell widgets. The cell widgets itself emit their own signals when their values change.
Btw, is it an ordinary spinbox with plain numerical data? Another (and much more light-weight) option would be to set the data to the table widget items as numbers, not as text. Then the delegate would provide a spinbox as an editor, out of the box.
int number = 123;
item->setData(Qt::DisplayRole, number);
// i don't remember if table widget items are editable by default,
// the following line will make sure they are
item->setFlags(item->flags() | Qt::ItemIsEditable);
tableWidget->setItem(row, col, item);
int number = 123;
QTableWidgetItem* item = new QTableWidgetItem();
item->setData(Qt::DisplayRole, number);
// i don't remember if table widget items are editable by default,
// the following line will make sure they are
item->setFlags(item->flags() | Qt::ItemIsEditable);
tableWidget->setItem(row, col, item);
To copy to clipboard, switch view to plain text mode
Bookmarks