I am using Qt5.
Now I have a
That your QSqlTableModel is modifying (or trying to) the corresponding table in the database, and that's likely failing somehow. Is your extra column really corresponding to data coming from the database, or is it synthetized?
Anyhow, two possible solutions are
The idea is to use the proxy/subclass to augment the data (by synthetizing the extra column's data), as well as handle the checked status. In order to mark cells "checkable" you need to return
Qt::ItemIsCheckable from your model's
flags() implementation, then the view will call
data() asking for the