[Interest] Style plugin

Bache-Wiig Jens Jens.Bache-Wiig at digia.com
Fri Oct 25 18:15:35 CEST 2013


On 25 Oct 2013, at 15:27, Graham Labdon <Graham.Labdon at avalonsciences.com<mailto:Graham.Labdon at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131025/5fafdf74/attachment.html>


More information about the Interest mailing list