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. Column background in QTreeView

Column background in QTreeView

Scheduled Pinned Locked Moved General and Desktop
qtreeview
1 Posts 1 Posters 754 Views 1 Watching
  • 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.
  • Joel BodenmannJ Offline
    Joel BodenmannJ Offline
    Joel Bodenmann
    wrote on last edited by
    #1

    How can one set the background color of just one specific column in a QTreeView?
    I tried using the Qt::BackgroundRole in my model but the result is not satisfying as this only affects the rectangle of the item. Screenshot: http://paste.ugfx.org/sores/7505d64a54e0/a5bf1d94d58d.jpg

    What want is that the entire column has a solid background color. Basically the same as QTreeView::setAlternatingRowColors() would fill the entire row with a solid background color.

    Any ideas?

    Industrial process automation software: https://simulton.com
    Embedded Graphics & GUI library: https://ugfx.io

    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