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

QTreeview stylesheet "show-decoration-selected" has no effect

    XMLWordPrintable

Details

    • Windows
    • f4976f86cd265d7505da449dafe15c51e3c8cdc0 (qt/qtbase/5.12)

    Description

      According to Qt docs, The selection behavior of QTreeView can be controlled by the show-decoration-selected property. But setting this property in style sheet has no impact.

      It can be reproduced easily with "Simple Tree Model" example and setting stylesheet as follows:

      setStyleSheet("QTreeView { show-decoration-selected:1; }");
      

      Changing show-decoration-selected to 0 does not make any difference. Looks like value specified by the current style is not be overridden by the style sheet.
      For the styles Windows and WindowsVista the tree decoration is not be shown selected by default. And for Fusion style, Its is always shown. Cannot be changed by the stylesheet.

      Attachments

        1. class.png
          class.png
          19 kB
        2. collab.png
          collab.png
          22 kB
        3. interaction.png
          interaction.png
          50 kB
        4. qt65-tree-dont-show-decoration-selected.png
          qt65-tree-dont-show-decoration-selected.png
          101 kB
        5. qt65-tree-show-decoration-selected.png
          qt65-tree-show-decoration-selected.png
          103 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-73251
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              shmittal Shveta Mittal (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: