Some of you might have noticed, that there is no Windows classic style anymore in Windows 10. So when you use the background of a button to signal something, like an alarm, only a small border is changed and it is not really that good visible.
You can use "-style windows" or "-style fusion" as UI startup option. However this changes all UI elements which you probably do not want.
A way to get back the old style, but functional button, is to use a stylesheet.
Just add a stylesheet.css in the config directory of your project containing the following:
Code: Select all
QPushButton
{
background-color: rgb(214, 211, 206);
}It will look like the Windows classic style independent from the OS, the screen was taken from an openSuse machine:

You will see the various differences and benefits better once you set the background color of the button, see the examples included below. Note, the above button always uses the stylesheet and the below button is the unchanged OS button.
With that change you are able to also have influence on the button display on a webclient (or mobile UI), where you typically have no information which Windows style a user uses.
With the type option in the stylesheet you can apply this change only to specific buttons, if you like.
Hope that helps some of you.
BR,
Andreas Gruber
Head of WinCC OA customer care
Windows 10

Windows 7 AERO

Centos7 - GNOME

Windows 7 classic style

OpenSuse 13.2 - KDE
