How to set background without stylesheets?
Hi,
how can I set the background of a button without using stylesheets? I tried to do this with something like that:
Code:
pushbutton_ontop->setAutoFillBackground(true);
pushbutton_ontop
->setBackgroundRole
(QPalette::Button);
QPalette p
= pushbutton_ontop
->palette
();
pushbutton_ontop->setPalette(p);
But with no luck.
If I use stylesheets I can set the background color, but the whole button style is gone after that :(
Hope someone has a good idea...
Re: How to set background without stylesheets?
Windows XP/Vista/7 user-experience guidelines (or actually their style API) don't allow buttons with custom backgrounds. Changing the style is the only way.
Re: How to set background without stylesheets?