Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QStandardItem setCheckable(true) dosn't save checkbox state
umen242 last edited by
i have simple QStandardItemModel that holds the date to show in QTreeview
when i set one off the columns with :
then i check the checkbox , and close the QDialog that holds the Qtreeview .
when i open the QDialog box again the state dosn't saved . i dont build it again , all the other columns that are text
are saved in the view .
what im doing wrong , i dont what to loop and save the states over and over .
stima_ua last edited by
you need set check state by dafault.
void QStandardItem::setCheckState ( Qt::CheckState state )
this is just only say that user can change state
void QStandardItem::setCheckable ( bool checkable )