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

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

    XMLWordPrintable

    Details

    • Platform/s:
      Windows
    • Commits:
      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

        Error rendering 'com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule'. Please contact your Jira administrators.

          Activity

            People

            • Assignee:
              srutledg Shawn Rutledge
              Reporter:
              shmittal Shveta Mittal
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews Side Panel

                Error rendering 'com.meetme.plugins.jira.gerrit-plugin:gerrit-reviews-side-panel'. Please contact your Jira administrators.