Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Derived QTreeWidgetItem class painting
swarsi last edited by
i have derived my own class subclassing from QTreeWidgetItem and i want to be able to draw some of these items in a QTreeWidget with colored boxes surrounding the items. for instance, i want to be be able to draw a red outline around some of the items to give feedback on critical items. is this possible?
andre last edited by
Sure. However, you should probably look into using a delegate instead. One way would be to subclass [[doc:QStyledItemDelegate]] and reimplement its paint() method.