Hi everybody,
I need to customize some of the items I add inside a QTreeView.
I was hoping to achieve this without using a delegate and override paint().
I wanted to use setProperty() for each item and then tell the stylesheet SOMEHOW to get a different background for the items depending on that property.
cpp: item->setProperty("myproperty", "customizeMe")
qss
: QTreeView::item[myproperty
="customizeMe"] { background
=rgb
(...
) }
cpp: item->setProperty("myproperty", "customizeMe")
qss: QTreeView::item[myproperty="customizeMe"] { background=rgb(...) }
To copy to clipboard, switch view to plain text mode
This does not work, the items are rendered using the default style. What options do I have? Is this NOT possible using stylesheets only?
Thanks
Chris
Bookmarks