mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 14:18:38 -05:00
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:
parent
322a55c536
commit
bba2d80b98
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user