QTreeView custom first branch icon?

Matic Kukovec kukovecmatic at hotmail.com
Mon Aug 30 23:42:32 BST 2021


Hi guys,

Does anyone know how to change only the first branch icon of a QTreeView?
I want to be able to change just the first branch icons to not have a line to the top border of the widget.
This is how it currently looks:
[cid:b23c2880-84c5-4485-baf6-c85e59fee50c]
But I want to remove the line that goes to the top border of the widget, like so:
[cid:0cfbdba6-d1f1-4a6b-8091-b5290217330d]

I can't find anything on how to address the first branch in the style sheet. Tried inserting the ":first" selector in multiple positions in the stylesheet, but I had no success.

Any ideas/hints would be greatly appreciated.

Matic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210830/33deb55c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1552 bytes
Desc: image.png
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210830/33deb55c/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1563 bytes
Desc: image.png
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210830/33deb55c/attachment-0001.png>


More information about the PyQt mailing list