diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/scroll/wizard.json b/share/qtcreator/templates/wizards/projects/qtquickapplication/scroll/wizard.json index 5ebf0852168..c7acc28dddf 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/scroll/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/scroll/wizard.json @@ -160,17 +160,9 @@ "type": "ComboBox", "data": { - "index": 1, + "index": 0, "items": [ - { - "trKey": "Default", - "value": - { - "QtQuickControlsStyle": "Default", - "QtQuickControlsStyleTheme": "" - } - }, { "trKey": "Material Light", "value": diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/stack/wizard.json b/share/qtcreator/templates/wizards/projects/qtquickapplication/stack/wizard.json index 2f0d0353f54..572292ec757 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/stack/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/stack/wizard.json @@ -178,17 +178,9 @@ "type": "ComboBox", "data": { - "index": 1, + "index": 0, "items": [ - { - "trKey": "Default", - "value": - { - "QtQuickControlsStyle": "Default", - "QtQuickControlsStyleTheme": "" - } - }, { "trKey": "Material Light", "value": diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/swipe/wizard.json b/share/qtcreator/templates/wizards/projects/qtquickapplication/swipe/wizard.json index 804916d77a8..4f7e8f14799 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/swipe/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/swipe/wizard.json @@ -178,17 +178,9 @@ "type": "ComboBox", "data": { - "index": 1, + "index": 0, "items": [ - { - "trKey": "Default", - "value": - { - "QtQuickControlsStyle": "Default", - "QtQuickControlsStyleTheme": "" - } - }, { "trKey": "Material Light", "value": diff --git a/src/plugins/qmldesigner/components/componentcore/changestyleaction.cpp b/src/plugins/qmldesigner/components/componentcore/changestyleaction.cpp index 1c1eba4944e..0b73a1f39de 100644 --- a/src/plugins/qmldesigner/components/componentcore/changestyleaction.cpp +++ b/src/plugins/qmldesigner/components/componentcore/changestyleaction.cpp @@ -64,11 +64,18 @@ QWidget *ChangeStyleWidgetAction::createWidget(QWidget *parent) { auto comboBox = new QComboBox(parent); comboBox->setToolTip(tr(enabledTooltip)); + // The Default style was renamed to Basic in Qt 6. In Qt 6, "Default" + // will result in a platform-specific style being chosen. + comboBox->addItem("Basic"); comboBox->addItem("Default"); comboBox->addItem("Fusion"); comboBox->addItem("Imagine"); + if (Utils::HostOsInfo::isMacHost()) + comboBox->addItem("macOS"); comboBox->addItem("Material"); comboBox->addItem("Universal"); + if (Utils::HostOsInfo::isWindowsHost()) + comboBox->addItem("Windows"); comboBox->setEditable(true); comboBox->setCurrentIndex(0); @@ -132,7 +139,7 @@ void ChangeStyleAction::currentContextChanged(const SelectionContext &selectionC if (Utils::FilePath::fromString(confFileName).exists()) { QSettings infiFile(confFileName, QSettings::IniFormat); - m_action->handleModelUpdate(infiFile.value("Controls/Style", "Default").toString()); + m_action->handleModelUpdate(infiFile.value("Controls/Style", "Basic").toString()); } else { m_action->handleModelUpdate(""); } diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index acf3083b3e8..8295a0346cf 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -487,7 +487,7 @@ QProcessEnvironment PuppetCreator::processEnvironment() const #else const QString controlsStyle; #endif - if (!controlsStyle.isEmpty() && controlsStyle != "Default") { + if (!controlsStyle.isEmpty()) { environment.set("QT_QUICK_CONTROLS_STYLE", controlsStyle); environment.set("QT_LABS_CONTROLS_STYLE", controlsStyle); } @@ -498,13 +498,6 @@ QProcessEnvironment PuppetCreator::processEnvironment() const const QString styleConfigFileName = getStyleConfigFileName(); - /* QT_QUICK_CONTROLS_CONF is not supported for Qt Version < 5.8.1, - * but we can manually at least set the correct style. */ - if (!styleConfigFileName.isEmpty()) { - QSettings infiFile(styleConfigFileName, QSettings::IniFormat); - environment.set("QT_QUICK_CONTROLS_STYLE", infiFile.value("Controls/Style", "Default").toString()); - } - if (!m_qrcMapping.isEmpty()) { environment.set("QMLDESIGNER_RC_PATHS", m_qrcMapping); }