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.


Qt Code:
  1. cpp: item->setProperty("myproperty", "customizeMe")
  2.  
  3. 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