[Qt-interest] Qt::CheckStateRole
Malyushytsky, Alex
alex at wai.com
Thu Sep 17 03:22:56 CEST 2009
According to my understanding there is no such predefined relations between parent item and children.
You can do it yourself.
Each time child is changed you can enforce parent item update it state..
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Willy P
Sent: Wednesday, September 16, 2009 6:07 PM
To: Willy P
Subject: [Qt-interest] Qt::CheckStateRole
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
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list