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/README29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/assets/icons/README b/src/assets/icons/README
new file mode 100644
index 0000000000..26d94e9ff1
--- /dev/null
+++ b/src/assets/icons/README
@@ -0,0 +1,29 @@
+Copyright (C) 2023 The Qt Company Ltd.
+SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+Setting up a project for using Example icon library
+
+1. Add ExampleIconsPrivate component to your project CMakeList.txt file
+ ...
+ find_package(Qt6
+ REQUIRED COMPONENTS Core Gui Widgets ExampleIconsPrivate
+ )
+
+ target_link_libraries(imageviewer PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Widgets
+ Qt6::ExampleIconsPrivate
+ )
+ ...
+
+2. Load the theme
+ ...
+ 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");
+ ...