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

currentItemChanged signal not gererated when clicking on check box of QTreeWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 4.8.5, 5.2.1
    • Widgets: Itemviews
    • Windows 7 64-bit
      Linux CentOS 64-bit
      OpenSource Qt 4.8.1
      Desktop application

    Description

      QTreeWidget is not working as expected when clicking on check-box of non-leaf item. My QTreeWidget has two level of child and each item in the tree widget can be checked (check-box is enabled for each item). In this QTreeWidget, leaf items are user selectable, but non-leaf items are not selectable and all items are enabled and user check-able.

      • []Family node1
        • []Primary node1
          • []child1
        • []Secondary node1
          • []child1
      • []Family node2
        • []Primary node2
          • []child2
        • []Secondary node2
          • []child2

      Leaf items flag setting

      Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled
      

      Non-leaf items flag setting

      Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsTristate
      

      When we directly click on leaf item's associated check-box, Qt is generating currentItemChanged() signal. But, when we click directly on non-leaf item's associated check-box, then currentItemChanged() signal is not getting generated. This causes inconvenience in the non-leaf item handling.

      It was working fine in Qt 4.7.4, but it is not working in Qt 4.8.1 on all platforms (Windows, Darwin, and Linux).

      I attached a sample program to reproduce this bug.

      Is this a bug or expected behavior?

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jain_vipin_swm Vipin Jain
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes