On 25 Oct 2013, at 15:27, Graham Labdon 
<graham.lab...@avalonsciences.com<mailto:graham.lab...@avalonsciences.com>> 
wrote:

Hi
I am trying to follow the style plugin example given here -
http://qt-project.org/doc/qt-5.0/qtwidgets/tools-styleplugin.html
The docs state that
Note: On some platforms, the native style will prevent the button from having a 
red background. In this case, try to run the example in another style (e.g., 
fusion).

And indeed on my Windows 7 box the color of the button is unchanged.

Does this mean that there is no way to change the backgound color of a widget 
using style plugins on windows?

Thanks

No. There are several ways to get a red button on windows. It just means you 
cannot have a _native_ looking red button since the button background pixmap is 
provided by the operating system and does not support custom palettes. A custom 
style is not affected by this limitation since you will be drawing it yourself, 
similarly you can create a red button with a style sheet or simply use Fusion 
style with your application or widget when you specifically need custom palette 
colours.

Regards,
Jens
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to