Alundra
18th January 2015, 00:51
Hi all,
Is it possible to know the background color in QStyledItemDelegate on this function ?
void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
I would draw the item with a width less the icon size, the icon has transparent color around so the selection color or background of the widget has to be renderer on a rect.
I know the size of the rect, I know how paint more little, only know the good color is missing.
Is it possible to know the code needed ?
Thanks for the help
Is it possible to know the background color in QStyledItemDelegate on this function ?
void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
I would draw the item with a width less the icon size, the icon has transparent color around so the selection color or background of the widget has to be renderer on a rect.
I know the size of the rect, I know how paint more little, only know the good color is missing.
Is it possible to know the code needed ?
Thanks for the help