Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    General and Desktop
    qtreeview qpalette highlight
    4
    4
    1650
    Loading More Posts
    • 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
      esope last edited by

      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 Reply Quote 0
      • busybee
        busybee last edited by

        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 Reply Quote 0
        • mrjj
          mrjj Lifetime Qt Champion last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • First post
              Last post