Update readme

Now that style.qss has been added to the qrc file, users do not
need to add it themselves.
This commit is contained in:
ColinDuquesnoy 2014-02-17 15:58:00 +01:00
parent 322a55c536
commit bba2d80b98
1 changed files with 3 additions and 5 deletions

View File

@ -44,12 +44,10 @@ C++
2) Add **qdarkstyle/style.qrc** to your **.pro file**
3) Add **qdarkstyle/style.qss** to your resources.
4) Load the stylesheet:
3) Load the stylesheet:
```cpp
QFile data(":path/to/style.qss"); // TODO: set your own resource path
QFile f(":qdarkstyle/style.qss");
if (!f.exists())
{
printf("Unable to set stylesheet, file not found\n");
@ -57,7 +55,7 @@ if (!f.exists())
else
{
f.open(QFile::ReadOnly | QFile::Text);
QTextStream ts(&data);
QTextStream ts(&f);
QApplication::instance()->setStyleSheet(ts.readAll());
}