Update README.md

Improve c++ installation/usage procedure
This commit is contained in:
Colin Duquesnoy 2014-01-29 17:52:23 +01:00
parent 3094cfb0c9
commit 03e50a75cc

View File

@ -36,11 +36,32 @@ pip install qdarkstyle
C++
---------
Download/clone the project and copy the following files to your application directory:
1) Download/clone the project and copy the following files to your application directory (keep the existing directory hierarchy):
- **qdarkstyle/style.qss**
- **qdarkstyle/style.qrc**
- **qdarkstyle/rc/** (the whole directory)
2) Add **qdarkstyle/style.qrc** to your **.pro file**
3) Load the stylesheet:
```cpp
QFile f("style.qss");
if ( !f.exists() )
{
printf("Unable to stylesheet\n");
}
else
{
f.open(QFile::ReadOnly | QFile::Text);
QTextStream ts(&f);
app.setStyleSheet(ts.readAll());
}
```
- **qdarkstyle/style.qss**
- **qdarkstyle/style.qrc**
- **qdarkstyle/rc/** (the whole directory)
Usage
============