diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-05-04 15:51:53 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-05-13 13:11:56 +0000 |
commit | 6077e77352add46c2f185d724c2c91946ef0b05d (patch) | |
tree | 8b19ffea37a56c49f8eceb42c27e9704ff7b2203 /src/imports/controls/imagine/imagine.pro | |
parent | d2897a6c85d46d41ea531ac66345cfdec230e7c9 (diff) |
Add Qt Quick Compiler support for external styles
Qt Quick Controls 2 selects its style when the main QtQuick.Controls
plugin is loaded. The style selection procedure resolves styled QML
files, such as Button.qml and Slider.qml, from the requested style.
The problem was that external styles were not able to embed styled
QML files into resources, because the external style plugin had not
yet been loaded when the style selection was performed. Only after
Button.qml & friends had been registered, and an instance was created,
those types would import the style (e.g. QtQuick.Controls.Material).
This patch solves the problem by manually loading the external style
plugin from the main Qt Quick Controls 2 plugin, in order to gain
access to its styled QML files in the resources. The name of the
style plugin is read from the qmldir file.
Change-Id: I5095ca129e909fb48fd106c87946a6ab9ae88931
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/imports/controls/imagine/imagine.pro')
-rw-r--r-- | src/imports/controls/imagine/imagine.pro | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/controls/imagine/imagine.pro b/src/imports/controls/imagine/imagine.pro index 10582543..2368c0a4 100644 --- a/src/imports/controls/imagine/imagine.pro +++ b/src/imports/controls/imagine/imagine.pro @@ -22,7 +22,7 @@ qtquickcontrols2imaginestyle.files += \ $$files($$PWD/images/*.webp) RESOURCES += qtquickcontrols2imaginestyle -CONFIG += no_cxx_module +CONFIG += no_cxx_module install_qml_files builtin_resources qtquickcompiler load(qml_plugin) requires(qtConfig(quickcontrols2-imagine)) |