Qt Forum

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

    Qt Academy Launch in California!

    Solved How to style the background of a QTreeWidget?

    General and Desktop
    qtreewidget qt5 stylesheet
    1
    2
    1940
    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.
    • J
      Jakob last edited by

      I'm trying to style a QTreeWidget which I added to my form through an application-wide stylesheet. From http://doc.qt.io/qt-5/stylesheet-reference.html I was expecting that I could either do

      QTreeView {
          background-color: red;
      }
      
      /* or */
      QTreeWidget {
          background-color: red;
      }
      

      None of them work however - how can I change the background color of this widget?

      1 Reply Last reply Reply Quote 0
      • J
        Jakob last edited by

        It turns out the style was overwritten by a style appearing at the end of the stylesheet...... bummer

        1 Reply Last reply Reply Quote 1
        • First post
          Last post