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

QStandardItem::setAutoTristate() does not work because functionality is in QTreeWidget rather than QTreeView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.6.2
    • Widgets: Itemviews
    • None

    Description

      The documentation says:

      http://doc.qt.io/qt-5/qstandarditem.html#setAutoTristate

      "Determines that the item is tristate and controlled by QTreeWidget if tristate is true. This enables automatic management of the state of parent items in QTreeWidget (checked if all children are checked, unchecked if all children are unchecked, or partially checked if only some children are checked)."

      But QTreeWidget only support QTreeWidgetItem, which is not related to QStandardItem. And my tests to use QTreeView with setAutoTristate() and QStandardItems showed no success... So it looks like QStandardItem::setAutoTristate() just has no effect except for setting the ItemIsAutoTristate flag, which is only handled by QTreeWidget which in turn only accepts QTreeWidgetItem and not QStandardItems.

      Attachments

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

        Activity

          People

            dfaure_kdab David Faure
            florian_link Florian Link
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes