[Qt-interest] Qt::CheckStateRole

Willy P willy.lists at gmail.com
Thu Sep 17 03:06:56 CEST 2009


I've implemented my own model by inheriting from QAbstractItemModel
and my own view by inheriting from QTreeView.  I've got all the
parents and children showing up and I've got checkboxes showing up
next to them in their proper state.  Checking and unchecking items is
properly setting the values in the model, but they're not cascading up
the chain to the parents.  In other words, in the view, a parent's
check state is not Qt::PartiallyChecked when only some of it's
children are checked.  How do I get the automatic updating of parent's
and children's checkboxes?  Or do I have to do that myself?

Thanks in advance...

-Willy



More information about the Qt-interest-old mailing list