PDA

View Full Version : QSS problem



Annihilator
23rd March 2012, 20:01
I use a qss file in my application like

QFile qss(".\\resources\\styles.qss");
qss.open(QFile::ReadOnly);
a.setStyleSheet(qss.readAll());
qss.close();
It works well and has applied styles when I start the application from QtCreator or VS2010. But if I try starting the application directly from a folder clicking exe-file, the one looks like styles were not applied.

I don't know the reason of such behavior.

Thanks

Annihilator
24th March 2012, 12:05
Resolved.
I placed qss reference to the qrc-file

<file>resources/styles.qss</file>
and in my application did something like

QFile qss(":/resources/styles.qss");