Skip to content

Commit 0cada50

Browse files
committed
feat(docs): Add documentation to the README on how to use the icons.py script
See papyros#404
1 parent 59c394e commit 0cada50

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ Brought to you by the [Papyros development team](https://github.com/papyros/qml-
1515

1616
### Dependencies
1717

18-
* Qt 5.4 or higher.
19-
* CMake
20-
* [Extra CMake Modules](http://api.kde.org/ecm/manual/ecm.7.html)
18+
* Qt 5.5 or higher
2119

2220
### Per-project installation using QPM
2321

@@ -56,6 +54,21 @@ From the root of the repository, run:
5654

5755
Now check out the `demo` folder to see how to use Material Design from QtQuick!
5856

57+
### Icons usage
58+
59+
When using the `Icon` component or the `iconName` property, qml-material looks for icons in the form of `qrc:/icons/<category>/<name>.svg`. Only a core set of icons used by qml-material icons are actually bundled with qml-material. To use icons in your own programs, you can either manually create a qrc file, or you can create `icons.yml` file and use the `icons.py` script from qml-material.
60+
61+
To use the `icons.py` script, create a file called `icons.yml` that looks like this:
62+
63+
icons:
64+
- action/settings
65+
- alert/warning
66+
- ...
67+
68+
Run `icons.py`, located in the `scripts` folder of the repository. This will download the latest version of all the icons listed in this file, storing them in a folder called `icons`. It also generates a resource file called `icons/icons.qrc`, which you should add to your QMake or CMake project.
69+
70+
Now whenever you add icons to the `icons.yml` file, just rerun `icons.py` and the new icons will be downloaded. To update your icons, just delete the `icons` folder and rerun `icons.py`.
71+
5972
### Licensing
6073

6174
QML Material is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

0 commit comments

Comments
 (0)