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. QTreeView::palette().highlight() is not the same color as seen!

QTreeView::palette().highlight() is not the same color as seen!

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtreeviewqpalettehighlight
4 Posts 4 Posters 2.0k 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.
  • E Offline
    E Offline
    esope
    wrote on 17 Feb 2016, 19:01 last edited by
    #1

    Hi,

    I try to find the contained brush color of the light blue used by the QTreeView while a row is selected and I cannot find it.

    I tried the :

    QTreeView::palette().highlight() 
    

    but this return another blue. The highlight is dark blue since the actual one is really pale (with darker blue oultine). Also, the highlightText is white while the actual text is black.

    Anybody know how to find it? I want to use this color in my delegate.

    Many thanks to all!

    1 Reply Last reply
    0
    • B Offline
      B Offline
      busybee
      wrote on 1 Mar 2016, 14:47 last edited by
      #2

      I don't have an answer to your question, sorry. However, for info, I reproduce this behavior only with QWindowsVistaStyle, the palette is correctly used by QCleanlooksStyle, QWindowsXPStyle, QPlastiqueStyle.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 1 Mar 2016, 15:57 last edited by
        #3

        Hi
        If you just want the color, then press print screen, start paint brush and use the color pickter to see RGB value.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 1 Mar 2016, 21:51 last edited by
          #4

          Hi,

          To add to @mrjj, the styles are free to ignore the palette or certain elements of the palette.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

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