Unsolved Setting style on QTreeWidget root items (PyQT)
-
Is there a way to set a style for only the root items in a QTreeWidget?
For example if below is my tree, I'd like to set a style on just the "/bob" and "/tom" items.
/bob /photos /documents /tom /photos /documents
I tried this and a few other variations with no luck:
TREE_STYLESHEET = """ QTreeView::item:first { background-color: red; } """ self.MyTreeWidget.setStyleSheet(TREE_STYLESHEET)
I've been looking here: