Setting icon to each items head
Now I'm implementing QTreeView with QStandardItem(Model).
Does anybody know if I can set an icon to the head of each item(row), instead of the default up/down arrow?
Many thanks in advance for your update!
@VRonin Thanks for an update!
Yes, I'm reading it right now!
I want to switch the icon from multiple icon list according to the contents.
SO,,,,, I need to program to switch the stylesheet (eg.QTreeView::branch:open/close), correct?
Not sure any alternative solution at the moment..
Are you sure you can't work with just the
Qt::DecorationRole? what you want to implement is not easy at all.
Either you subclass a style and reimplement
QStyle::PE_IndicatorBranchor use the stylesheet to remove the indicators altogether and paint them over manually subclassing