dpimka
10th July 2009, 16:08
Hi guys!
I have a subclass of QStyledItemDelegate and I want to reuse its decoration and selection painting, while painting text and other parts by myself.
I wonder how to achieve that.
I checked out QStyledItemDelegate's sources and found that it simply uses QStyle::drawControl() to draw CE_ItemViewItem.
Didn't find any way to use QStyle to draw selection (ordinary + hovered) only.
Any hints?
I have a subclass of QStyledItemDelegate and I want to reuse its decoration and selection painting, while painting text and other parts by myself.
I wonder how to achieve that.
I checked out QStyledItemDelegate's sources and found that it simply uses QStyle::drawControl() to draw CE_ItemViewItem.
Didn't find any way to use QStyle to draw selection (ordinary + hovered) only.
Any hints?