diff options
author | Amir Masoud Abdol <amirmasoudabdol@icloud.com> | 2022-12-08 14:56:15 +0100 |
---|---|---|
committer | Amir Masoud Abdol <amirmasoudabdol@icloud.com> | 2023-01-18 14:47:12 +0100 |
commit | 7fe2537ce20ebf887d71fe0d0d0fb14b429d68be (patch) | |
tree | e46007589c9ea026769b0ffe3300b8a964ecc119 /examples/widgets/tools/styleplugin/plugin/plugin.pro | |
parent | b171abe69533a83c5b6fea51807da3ad45a1d3f3 (diff) |
Fix Style Plugin Example, and add some CMake Docs
A few things:
- Improved the documentation by adding a CMake section, briefly
describing the process of adding the plugin, and placing it where it
should be.
- Write a note about the case where the style may be overwritten at
launch, and how to set the a new style using a CLI
- Improved the CMake build such that it creates the App Bundle
correctly, and also works without an App Bundle as well.
- Changed the example, and plugin such that now instead of a QPushButton
we have a QTextEdit, and change the text color.
- Replaced the application screenshot
Fixes: QTBUG-107842
Fixes: QTBUG-109227
Change-Id: I161a91b27df016ff6230fac3871b79d2dfbdf18a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/widgets/tools/styleplugin/plugin/plugin.pro')
-rw-r--r-- | examples/widgets/tools/styleplugin/plugin/plugin.pro | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/widgets/tools/styleplugin/plugin/plugin.pro b/examples/widgets/tools/styleplugin/plugin/plugin.pro index 35184fc82a..5ab00016ca 100644 --- a/examples/widgets/tools/styleplugin/plugin/plugin.pro +++ b/examples/widgets/tools/styleplugin/plugin/plugin.pro @@ -12,7 +12,17 @@ win32 { CONFIG(debug, release|debug):DESTDIR = ../debug/styles/ CONFIG(release, release|debug):DESTDIR = ../release/styles/ } else { - DESTDIR = ../styles/ + macos { + # The non-app-bundle case is not supported with qmake, because + # the plugin project cannot know whether the app is built + # as a bundle or not. + DESTDIR = ../styleplugin.app/Contents/PlugIns/styles/ + contains(QT_CONFIG, debug) { + TARGET = $$join(TARGET,,,_debug) + } + } else { + DESTDIR = ../styles/ + } } EXAMPLE_FILES += simplestyle.json |