[Interest] Plastique style & stylesheets
Jens.Bache-Wiig at digia.com
Tue Dec 24 12:38:03 CET 2013
On 23 Dec 2013, at 12:17, Etienne Sandré-Chardonnal <etienne.sandre at m4x.org> wrote:
> I am trying to use the plastique style and change its colors to a dark theme.
> However, simply doing :
> color: #b1b1b1;
> background-color: #323232;
> Messes several things including scrollbars:
> As you can see, the double arrow in the bottom is removed, the round corners are lost, etc... So it seems that plastique is not fully stylable.
> Is there a workaround, or a more customizable style in Qt4? Or is it time to switch to Qt5 and fusion?
As others have already pointed out, when you do extensive customisation like this, style-sheets will fall back to using the same style on all platforms which happen to be windows style. Not all styles support palettes equally well and especially not in combination with style sheets. However in your case the workaround would be pretty simple. If all you want is to modify the palette, then you do not have to use style sheets at all. Simply create a custom QPalette with your preferred colors and apply this on your QApplication object at startup instead.
More information about the Interest