Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.1, 5.2.1, 5.4.0 Beta
-
None
-
4910f416c2c0d1ec4a11408647bc6c96c719ce18
Description
The expectation of using the flag ItemIsTristate on an QTreeWidgetItem is that its check state should be dependant of its children check state only. The "partially check" state should not be a mode available through the user click.
I guess the expected states for an item with the tristate flag are:
-all its children ckecked => the item is checked
-no children checked => the item is unchecked
-some children are checked / some are not => the item is partially checked
-by clicking on the item checkbox the item should be either checked (and with it all it children) or unchecked (and with it all its children).
Now the problem is that if the user clicks the item's check box, the item can get the 3 states and its children as well. So the item check state can be set to "partially check" which causes all its children to get the "partially check" state as well; and this even if the children don't have the tristate flag set up or even if the children have no children which does not make sense.
See file main.cpp to reproduce the issue
Attachments
Issue Links
- is duplicated by
-
QTBUG-38397 QItemDelegate and ItemIsTristate flag
- Closed
- relates to
-
QTBUG-7806 QTreeWidgetItem and flag ItemIsTristate
- Closed
-
QTBUG-7674 QItemDelegate and ItemIsTristate flag
- Closed
-
QTBUG-32445 QTreeWidgetItem check box does not get updated always.
- Open
For Gerrit Dashboard: QTBUG-40060 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
99149,2 | Q{Styled,}ItemDelegate: add setEditableTristate(). | 5.4 | qt/qtbase | Status: ABANDONED | 0 | 0 |
99482,2 | Q{Styled,}ItemDelegate: add setEditableTristate(). | dev | qt/qtbase | Status: ABANDONED | +1 | 0 |
103698,5 | Itemviews: add ItemIsUserTristate flag | dev | qt/qtbase | Status: MERGED | +2 | 0 |