[Qt-interest] Stylesheets and runtime styling...

Markus Franke markus.franke at informatik.tu-chemnitz.de
Mon Mar 2 09:01:51 CET 2009


Hi,

well you could read the whole text file into a QString and then give  
the same one to the setStyleSheet() function.
Otherwise you might have to inherit from QStyle and integrate your own  
style into Qt. Then you can use the "-style" command when you launch  
the application to set the stylesheet.
I think the first option is more what you want to achieve.

Hope this helps a bit,

Markus

Zitat von Pankaj Chawla <pankaj013 at gmail.com>:

> Hi
> I recently started using stylesheets and its amazing to be able to customize
> the look and feel
> using it. I am now wondering if I can extract all the CCS styling into an
> external file and the
> app picks it up on runtime to apply the styling. That will save me the
> trouble of recompiling
> every time I want to try a new style. I am using
> QWidget->setStyleSheet(<style string>) as
> of now to do the styling from within the code.
>
> --
> Cheers
> Pankaj
>






More information about the Qt-interest-old mailing list