From 193becffbbf86731fcdc7e8434c185bbdd4bb80c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 4 Dec 2020 16:13:49 +0100 Subject: [PATCH] Fix Qt Quick wizards with Default style and Qt 6 The Default style got renamed to 'Basic' style in Qt 6.0. The 'default' is now to use the style of the system, if available. This however caused the projects generated by the wizard to not start with Qt6: QQmlApplicationEngine failed to load component qrc:/main.qml: module "Default" is not installed Work around this by not hardcoding the 'Default' style if set. It should be the default for Qt 5, anyhow. Fixes: QTCREATORBUG-24905 Change-Id: I71aff50b84e3d096b9a87b7e5b49e2df6821f938 Reviewed-by: Jarek Kobus Reviewed-by: Alessandro Portale --- .../wizards/projects/qtquickapplication/qtquickcontrols2.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/qtquickcontrols2.conf b/share/qtcreator/templates/wizards/projects/qtquickapplication/qtquickcontrols2.conf index 9c7633fb0a6..fd44f05995d 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/qtquickcontrols2.conf +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/qtquickcontrols2.conf @@ -1,6 +1,7 @@ ; This file can be edited to change the style of the application ; Read "Qt Quick Controls 2 Configuration File" for details: -; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html +; https://doc.qt.io/qt/qtquickcontrols2-configuration.html +@if '%{QtQuickControlsStyle}' != 'Default' [Controls] Style=%{QtQuickControlsStyle} @@ -21,3 +22,4 @@ Theme=%{QtQuickControlsStyleTheme} ;Foreground=Brown ;Background=Grey @endif +@endif