Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Setting icon to each items head
ShinSat last edited by ShinSat
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 last edited by VRonin
ShinSat last edited by
@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..
VRonin last edited by
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