Hi,
Can anyone pls tell me how to apply external stylesheet defined in a .qss file to a qt application? I'm using qt4.3
I dont want to use command line switch "-stylesheet".
Thanks in advance,
Namita
Hi,
Can anyone pls tell me how to apply external stylesheet defined in a .qss file to a qt application? I'm using qt4.3
I dont want to use command line switch "-stylesheet".
Thanks in advance,
Namita
Qt Code:
app.setStyleSheet(qss.readAll()); qss.close();To copy to clipboard, switch view to plain text mode
Hi,
Thanks a lot...
Now i'm able to apply external stylesheet to the qt application.
Regards,
Namita
QSS and Q_INIT_RESOURCES have nothing to do with each other.
As far my understand I think qss(qt Style sheet) is also a resources and Q_INIT_RESOURCES is required to initialise all resources. So i asked this. I also posted this inforum http://www.qtcentre.org/forum/f-qt-p...rce-12508.html But i didnt get any reply. So i asked this.
Cheers,
Phillip
--- Please post the solution you got to solve your problem. It may help others.
That's not true.
That's not true as well.and Q_INIT_RESOURCES is required to initialise all resources.
"Qt resources" is a virtual filesystem, nothing more, nothing less. Stylesheets have nothing to do with files and in this particular case the stylesheet is loaded from an external and real file.
Q_INIT_RESOURCES is only needed if you want to initialize resources that are embedded int a static library on some of the platforms. It' required to link them to the filesystem already existing in the application.
Do you need the macro? Yes, you can use it, but you probably don't have to.
Bookmarks