If only... but no, that's what I got now. As I said, it looks *almost* ok, just because the highlight color is pretty much the same as the "explorer" box border.
Just try with a different delegate, try drawing a pixmap or just text.
This should illustrate what I mean:
void ProgressBarDelegate
::paint( QPainter* painter,
const QStyleOptionViewItem
& option,
const QModelIndex
& index
) const {
if( option.
state & QStyle::State_Selected ) {
painter->fillRect( option.rect, option.palette.highlight() );
}
QStyledItemDelegate::paint(painter, option, index);
}
void ProgressBarDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
if( option.state & QStyle::State_Selected )
{
painter->fillRect( option.rect, option.palette.highlight() );
}
QStyledItemDelegate::paint(painter, option, index);
}
To copy to clipboard, switch view to plain text mode
Bookmarks