Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to disable item selection decorations in QTreeView?

How to disable item selection decorations in QTreeView?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 512 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dramcryx
    wrote on last edited by
    #1

    I'm not sure I can explain with words but with help of screenshot I will. How can I remove all decorations (frame and solid fill) when item is selected in QTreeView? Preferably with using style sheets.
    Снимок экрана от 2020-11-25 01-26-21.png

    Pl45m4P 1 Reply Last reply
    0
    • D Dramcryx

      I'm not sure I can explain with words but with help of screenshot I will. How can I remove all decorations (frame and solid fill) when item is selected in QTreeView? Preferably with using style sheets.
      Снимок экрана от 2020-11-25 01-26-21.png

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Dramcryx

      Have a look here

      • https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtreeview

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      D 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @Dramcryx

        Have a look here

        • https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtreeview
        D Offline
        D Offline
        Dramcryx
        wrote on last edited by
        #3

        @Pl45m4 there is nothing about removing selection colours. show-decoration-selected: 0; does not help either.

        Pl45m4P 1 Reply Last reply
        0
        • D Dramcryx

          @Pl45m4 there is nothing about removing selection colours. show-decoration-selected: 0; does not help either.

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by Pl45m4
          #4

          @Dramcryx

          What should show-decoration-selected do? There is no style property with this name.

          Try ::item:selected and the other suggestions. If these don't work, you can't do it with style sheet and you need to change your item or your model directly


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved