For anyone interested, I found out there's an easier and much neater way to do this..
After the:
this->setPalette( p );
QPalette p( this->palette() );
p.setColor( QPalette::Window, QColor(128,50,50,255) );
this->setPalette( p );
To copy to clipboard, switch view to plain text mode
Just call
this
->setBackgroundRole
(QPalette::Window);
this->setBackgroundRole(QPalette::Window);
To copy to clipboard, switch view to plain text mode
All of this code is from within the qscrollarea widget (subclass it, or change the code a bit so it doesn't use 'this' and do it from the outside)
regards,
kw
Bookmarks