I've not tried this, but from looking at the docs you have a signal
for QStandardItemModel
called itemChanged(QStandardItem *item)
. What you'd want to do is created a slot
named (for example) modelItemChanged(QStandardItem *item)
and connect
them with connect(assessmentModel, SIGNAL(itemChanged(QStandardItem *)), this, SLOT(modelItemChanged(QStandardItem *)))
.
That should set your model to trigger the slot
whenever an QStandardItem
is changed, and it'll pass a pointer to the item that was changed. In your modelItemChanged(QStandardItem *item)
function you can then query the QStandardItem *item
to see what state it is in.