PDA

View Full Version : How to apply stylesheet to all of my Qt applications ?



aaaaaa
15th February 2014, 00:15
Hi,

I'm a Qt applications' user, not (yet) a developper.

In order to tune the look of my Qt apps', I wrote a small stylesheet. I tested it, with the command line option -stylesheet and it looks cool. Now I would like to apply it "permanently" to all of my Qt apps'.

I thought I could do it with qtconfig or ~/.config/Trolltech.conf but I can't. I googled a lot and I can't find any tip or documentation. Actually, I'm not even sure if it's possible… I know that I can apply a home-made style or a built-in style, maybe a plugin but I wrote a stylesheet.

So how to apply stylesheet to all of my Qt applications ?
Any tip or documentation is welcome.

Thanks.

anda_skoa
15th February 2014, 13:22
Good question!

I think there is no way to configure a stylesheet across applications, but there might be a style plugin that supports that.

Cheers,
_

aaaaaa
15th February 2014, 14:27
Thank you for your fast reply !

What do you mean by "a style plugin" ?
Do I need to rewrite the style or can I embed the stylesheet in the "style plugin" ?
Can you point me some documentation if you know some ?

Thank you anyway.
I will search this way.

anda_skoa
15th February 2014, 16:23
Basically all widget styles are plugins, loaded by the application at runtime.
Which one usually depends on the platform or configuration but is sometimes hard coded by the application.

There could be such a style that allows to customize its look through its own configuration, maybe even allow to do that using stylesheets.

Cheers,
_