Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-7806

QTreeWidgetItem and flag ItemIsTristate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 4.6.1
    • Widgets: Itemviews
    • None

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              goffart Olivier Goffart (closed Nokia identity) (Inactive)
              sanonymous Nokia Qt Support (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes