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 stylesheet - row stylizing
Forum Updated to NodeBB v4.3 + New Features

QTreeView stylesheet - row stylizing

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 2.4k 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.
  • napajejenunedk0N Offline
    napajejenunedk0N Offline
    napajejenunedk0
    wrote on last edited by
    #1

    The Qt documentation states how to "stylize QTreeView":http://qt-project.org/doc/qt-5/stylesheet-examples.html#customizing-qtreeview. Question: how to draw the top and bottom border of a QTreeView row or column?

    The following code:
    @
    QTreeView::item {
    border: 1px solid transparent;
    border-bottom-color: red;
    }
    @

    imitates the desired effect but not at full extent. If the nodes of the QTreeView are expanded the greater the hierarchy level the less border is drawn at the beginning of the row. So, the bottom row border between the leftmost part of the QTreeview area and the given tree node is not drawn.

    Any suggestions how to draw the top and/or bottom border of a QTreeView's rows, so that it covers the whole row width?

    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