Hello all,
I'm searching for a "generic" solution to store checkbox status in a QSqlTableModel. In fact, I have a custom QSqlTableModel with a QSet<QPersistenModelIndex> to store all modelindex where the box are checked.
Of course i have redefined data(), setData(), flag(), removeRows().
--> My simple implementation is here on github :
sqltablemodelcheckable.cpp
sqltablemodelcheckable.h
The problem is : when I call "SubmitAll()", all my QPersistenModelIndex are automatically set to invalid. Are the modelindex that they refers are deleted, then recreated or something like that (???)
Does someone know why ? Or can indicate me another solution.
Thanks a lot.
Bookmarks