From 324aa339a0adaff5ca8896796ac54068666e195f Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 21 Sep 2016 17:37:18 +0200 Subject: [PATCH] Adding ini file for styles to Qt Quick Controls 2 wizard Change-Id: Ie3dd0c4422d402f811830d9d24382550ba560df0 Reviewed-by: J-P Nurmi Reviewed-by: Thomas Hartmann --- .../qmake/qtquickcontrols2application/qml.qrc | 1 + .../qtquickcontrols2.conf | 15 ++++++++ .../qtquickcontrols2application/wizard.json | 35 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/qtquickcontrols2.conf diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/qml.qrc b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/qml.qrc index 67415af3119..44587bd57b5 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/qml.qrc +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/qml.qrc @@ -3,5 +3,6 @@ main.qml Page1.qml Page1Form.ui.qml + qtquickcontrols2.conf diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/qtquickcontrols2.conf b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/qtquickcontrols2.conf new file mode 100644 index 00000000000..0b853e0ea9c --- /dev/null +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/qtquickcontrols2.conf @@ -0,0 +1,15 @@ +; This file can be edited to change the style of the application +; See Styling Qt Quick Controls 2 in the documentation for details: +; http://doc.qt.io/qt-5/qtquickcontrols2-styles.html + +[Controls] +Style=%{ControlsStyle} + +[Universal] +Theme=Light +;Accent=Steel + +[Material] +Theme=Light +;Accent=BlueGrey +;Primary=BlueGray diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/wizard.json b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/wizard.json index 4193461bf31..ee2ec0ad926 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/wizard.json @@ -29,6 +29,38 @@ "trShortTitle": "Location", "typeId": "Project" }, + { + "trDisplayName": "Define Project Details", + "trShortTitle": "Details", + "typeId": "Fields", + "data": + [ + { + "name": "ControlsStyle", + "trDisplayName": "Qt Quick Controls 2 Style:", + "type": "ComboBox", + "data": + { + "index": 0, + "items": + [ + { + "trKey": "Default", + "value": "Default" + }, + { + "trKey": "Material", + "value": "Material" + }, + { + "trKey": "Universal", + "value": "Universal" + } + ] + } + } + ] + }, { "trDisplayName": "Kit Selection", "trShortTitle": "Kits", @@ -73,6 +105,9 @@ { "source": "qml.qrc" }, + { + "source": "qtquickcontrols2.conf" + }, { "source": "../../git.ignore", "target": "%{ProjectDirectory}/.gitignore",