summaryrefslogtreecommitdiffstats
path: root/src/assets/icons/README
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets/icons/README')
-rw-r--r--src/assets/icons/README10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/assets/icons/README b/src/assets/icons/README
index 46c1522e69..26d94e9ff1 100644
--- a/src/assets/icons/README
+++ b/src/assets/icons/README
@@ -17,7 +17,13 @@ Setting up a project for using Example icon library
)
...
-2. Create image resource in your application code:
+2. Load the theme
...
- bool success = img->load(":/qt-project.org/examples/icons/32x32/document-new.png");
+ QIcon::setThemeSearchPaths(QIcon::themeSearchPaths() << u":/qt-project.org/icons"_s);
+ QIcon::setFallbackThemeName(u"example_icons"_s);
+ ...
+
+3. Use the icons
+ ...
+ const QIcon openIcon = QIcon::fromTheme("document-open");
...