QTreeWidget Indicator Checkmarks
-
Is there anyway to change the color of the checkmarks on certain items in a qtreewidget and leave those of other items untouched? This is so that the user can see what was already checked off on a previous checklist, when making a new checklist.
Or is there a way to set customized icons for the checkmarks instead of the built in checkmark icons?
-
Thanks Gerolf. Subclassing QStyledItemDelegate worked. I only had to reimplement the paint function. I painted the checkbox area of the items via QPainter::drawPixmap(QRect, QPixmap). I used QStyle::subElementRect(QStyle::SE_CheckBoxIndicator, &option, widget) to supply the QRect object and created the QPixmap object using customized icons.