I'm creating a property editor widget based on a QTreeView and would like to add horizontal/vertical lines to separate rows and columns. I attempted to set the following stylesheet on the QTreeView:
Qt Code:
border-right: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9; } border-bottom: 1px solid #d9d9d9; }To copy to clipboard, switch view to plain text mode
The grid appears as expected but selected items aren't highlighted in blue anymore. Furthermore, the [+] symbol to expand a group appears to be gone.
Before:
GAp95.png
After:
Sa7OG.png
If there is any method other than setting the stylesheet to achieve the same result, I'd be glad to hear about them. I tried the QStyledItemDelegate method but unfortunately, the horizontal lines do not cover the "branch" region.
Thanks for your help.
Bookmarks