mirror of
https://github.com/ColinDuquesnoy/QDarkStyleSheet.git
synced 2026-08-29 08:34:30 +08:00
Improve C++ usage description, fixes #329
This commit is contained in:
+8
-8
@@ -101,26 +101,26 @@ C++
|
|||||||
|
|
||||||
- Download/clone the project and copy the following files to your
|
- Download/clone the project and copy the following files to your
|
||||||
application directory (keep the existing directory hierarchy).
|
application directory (keep the existing directory hierarchy).
|
||||||
Substitute the **theme** by the currently available (dark/light)
|
Substitute the all the **THEME** words by the currently available
|
||||||
the theme you need to use.
|
(dark/light) the theme you need to use.
|
||||||
|
|
||||||
- **qdarkstyle/theme/style.qss**
|
- **qdarkstyle/THEME/THEMEstyle.qss**
|
||||||
- **qdarkstyle/theme/style.qrc**
|
- **qdarkstyle/THEME/THEMEstyle.qrc**
|
||||||
- **qdarkstyle/theme/rc/** (the whole directory)
|
- **qdarkstyle/THEME/rc/** (the whole directory)
|
||||||
|
|
||||||
|
|
||||||
- Add **qdarkstyle/theme/style.qrc** to your **.pro file** as follows:
|
- Add **qdarkstyle/THEME/THEMEstyle.qrc** to your **.pro file** as follows:
|
||||||
|
|
||||||
.. code:: c++
|
.. code:: c++
|
||||||
|
|
||||||
RESOURCES += qdarkstyle/theme/style.qrc
|
RESOURCES += qdarkstyle/THEME/THEMEstyle.qrc
|
||||||
|
|
||||||
|
|
||||||
- Load the stylesheet:
|
- Load the stylesheet:
|
||||||
|
|
||||||
.. code:: c++
|
.. code:: c++
|
||||||
|
|
||||||
QFile f(":qdarkstyle/theme/style.qss");
|
QFile f(":qdarkstyle/THEME/THEMEstyle.qss");
|
||||||
|
|
||||||
if (!f.exists()) {
|
if (!f.exists()) {
|
||||||
printf("Unable to set stylesheet, file not found\n");
|
printf("Unable to set stylesheet, file not found\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user