|
…
|
||
|---|---|---|
| .. | ||
| 16x16 | ||
| 16x16@2 | ||
| 32x32 | ||
| 32x32@2 | ||
| 128x128 | ||
| 128x128@2 | ||
| 256x256 | ||
| 256x256@2 | ||
| scalable | ||
| CMakeLists.txt | ||
| README | ||
| index.theme | ||
README
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");
...