QTableWidget, emits tableCellChanged
-
I have an instance of QTableWidget, during the table set-up and population I call:
const QSignalBlocker blocker(*pobjTable);
Where pobjTable is a pointer to the instance of QTableWidget. This works fine, however when I click on a cell the signal cellChanged is emitted, no data has changed at this point so is this a bug?
Its annoying that the signal does not include any previous or new data, just the column and row numbers.
[Edit] Actually I think its my understanding thats wrong and I think the signal is badly named, its emitted when the selection of the cell changes, not the data.
The description here (https://doc.qt.io/qt-6/qtablewidget.html#cellChanged) is misleading because its emitted when the data has not changed.
-
@SPlatten
I don't know but I would only have expected, say,cellActivated
. I would check your assertion that just clicking causescellChanged
, as opposed to either editing or setting it in code? You might verify your data before and after the signal. I'm not sure, but doesn't aQTableWidget
start with no items in the cells, even putting an empty one in there might be a change?