From 7fe2537ce20ebf887d71fe0d0d0fb14b429d68be Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Thu, 8 Dec 2022 14:56:15 +0100 Subject: 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 --- examples/widgets/tools/styleplugin/plugin/plugin.pro | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'examples/widgets/tools/styleplugin/plugin/plugin.pro') 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 -- cgit v1.2.3