I use delegate to draw the rows.
In paint function:
if( option.
state & QStyle::State_Selected ) {
QRect rect
( option.
rect );
rect.setLeft( 0 );
painter->fillRect( rect, option.palette.highlight() );
}
if( option.state & QStyle::State_Selected )
{
QRect rect( option.rect );
rect.setLeft( 0 );
painter->fillRect( rect, option.palette.highlight() );
}
To copy to clipboard, switch view to plain text mode
For this, all the area can be highlighted. But overwritted decoration can't be shown. Maybe the color of decoration should be changed when selected.
Bookmarks