Wizards: Reduce QtQuick wizards to essentials

The new/upcoming way of co-authoring and sharing a project in Qt
Creator and in Qt Design Studio, as-well as the disabling of the
QmlDesigner plugin in Qt Creator are a substantial step in the
offering.

The QtQuick application wizards must not stay behind, but rather also
reflect that change:

Keep one essential Qt Quick wizard in Qt Creator (which will eventually
support the project sharing approach). Leave the competence to create
Qml UI code to Qt Design Studio.

The removal of wizards for mobile-oriented ui code (for further hand
coding) also re-enforces the motto that application wizards should
create essentials, rather than example code.

Task-number: QTCREATORBUG-26160
Change-Id: I9775d70b45f97290ab65936ff6e373b6fc177c85
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Alessandro Portale
2021-09-20 11:45:52 +02:00
parent ee17e755a9
commit c2aeec7e86
22 changed files with 3 additions and 1519 deletions

View File

@@ -2,10 +2,10 @@
"version": 1, "version": 1,
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ], "supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
"id": "U.QtQuickApplicationEmpty", "id": "U.QtQuickApplicationEmpty",
"category": "E.ApplicationQtQuick", "category": "D.ApplicationQt",
"trDescription": "Creates a Qt Quick application that contains an empty window.", "trDescription": "Creates a Qt Quick application that contains an empty window.",
"trDisplayName": "Qt Quick Application - Empty", "trDisplayName": "Qt Quick Application",
"trDisplayCategory": "Application (Qt Quick)", "trDisplayCategory": "Application (Qt)",
"icon": "icon.png", "icon": "icon.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ], "featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}", "enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,60 +0,0 @@
import QtQuick %{QtQuickVersion}
import QtQuick.Controls %{QtQuickControlsVersion}
@if %{UseVirtualKeyboard}
import %{QtQuickVirtualKeyboardImport}
@endif
ApplicationWindow {
@if %{UseVirtualKeyboard}
id: window
@endif
width: 640
height: 480
visible: true
title: qsTr("Scroll")
ScrollView {
anchors.fill: parent
ListView {
id: listView
width: parent.width
model: 20
delegate: ItemDelegate {
text: "Item " + (index + 1)
width: listView.width
}
}
}
@if %{UseVirtualKeyboard}
InputPanel {
id: inputPanel
z: 99
x: 0
y: window.height
width: window.width
states: State {
name: "visible"
when: inputPanel.active
PropertyChanges {
target: inputPanel
y: window.height - inputPanel.height
}
}
transitions: Transition {
from: ""
to: "visible"
reversible: true
ParallelAnimation {
NumberAnimation {
properties: "y"
duration: 250
easing.type: Easing.InOutQuad
}
}
}
}
@endif
}

View File

@@ -1,6 +0,0 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>qtquickcontrols2.conf</file>
</qresource>
</RCC>

View File

@@ -1,302 +0,0 @@
{
"version": 1,
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
"id": "V.QtQuickApplicationScroll",
"category": "E.ApplicationQtQuick",
"trDescription": "Creates a Qt Quick Controls application with a ScrollView.",
"trDisplayName": "Qt Quick Application - Scroll",
"trDisplayCategory": "Application (Qt Quick)",
"icon": "icon.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.9" ],
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "IsQt6", "value": "%{JS: value('QtVersion').IsQt6}" },
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
{ "key": "QtQuickControlsVersion", "value": "%{JS: value('QtVersion').QtQuickControlsVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
{ "key": "QtQuickFeature", "value": "%{JS: (value('QtQuickVersion')=='') ? 'QtSupport.Wizards.FeatureQt.6.2' : 'QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}'}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
{ "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" },
{ "key": "AdditionalQmlFiles", "value": "" },
{ "key": "AdditionalQmlFilesQbs", "value": "" }
],
"pages":
[
{
"trDisplayName": "Project Location",
"trShortTitle": "Location",
"typeId": "Project"
},
{
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
"name": "BuildSystem",
"trDisplayName": "Build system:",
"type": "ComboBox",
"persistenceKey": "BuildSystemType",
"data":
{
"index": 0,
"items":
[
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
}
]
},
{
"trDisplayName": "Define Project Details",
"trShortTitle": "Details",
"typeId": "Fields",
"data":
[
{
"name": "QtVersion",
"trDisplayName": "Minimal required Qt version:",
"type": "ComboBox",
"persistenceKey": "QtQuick.minimumQtVersion",
"data":
{
"index": 1,
"items":
[
{
"trKey": "Qt 6.2",
"value":
{
"QtQuickVersion": "",
"QtQuickControlsVersion": "",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard",
"IsQt6": true
}
},
{
"trKey": "Qt 5.15",
"value":
{
"QtQuickVersion": "2.15",
"QtQuickControlsVersion": "2.15",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.15",
"IsQt6": false
}
},
{
"trKey": "Qt 5.14",
"value":
{
"QtQuickVersion": "2.14",
"QtQuickControlsVersion": "2.14",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.14",
"IsQt6": false
}
},
{
"trKey": "Qt 5.13",
"value":
{
"QtQuickVersion": "2.13",
"QtQuickControlsVersion": "2.13",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4",
"IsQt6": false
}
},
{
"trKey": "Qt 5.12",
"value":
{
"QtQuickVersion": "2.12",
"QtQuickControlsVersion": "2.5",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4",
"IsQt6": false
}
}
]
}
},
{
"name": "ControlsStyle",
"trDisplayName": "Qt Quick Controls Style:",
"type": "ComboBox",
"data":
{
"index": 0,
"items":
[
{
"trKey": "Material Light",
"value":
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Material Dark",
"value":
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal Light",
"value":
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Universal Dark",
"value":
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal System",
"value":
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "System"
}
},
{
"trKey": "Fusion",
"value":
{
"QtQuickControlsStyle": "Fusion",
"QtQuickControlsStyleTheme": ""
}
},
{
"trKey": "Imagine",
"value":
{
"QtQuickControlsStyle": "Imagine",
"QtQuickControlsStyleTheme": ""
}
}
]
}
},
{
"name": "UseVirtualKeyboard",
"trDisplayName": "Use Qt Virtual Keyboard",
"type": "CheckBox",
"persistenceKey": "QtQuick.UseVirtualKeyboard.%{UseVirtualKeyboardByDefault}",
"data":
{
"checked": "%{UseVirtualKeyboardByDefault}"
}
}
]
},
{
"trDisplayName": "Translation File",
"trShortTitle": "Translation",
"typeId": "QtTranslation"
},
{
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: !value('IsSubproject')}",
"data": {
"projectFilePath": "%{ProjectFile}",
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
}
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],
"generators":
[
{
"typeId": "File",
"data":
[
{
"source": "../app.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "%{JS: value('QtVersion').IsQt6 ? '../CMakeLists.6.x.txt' : '../CMakeLists.txt'}",
"target": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "../app.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "../main.cpp",
"target": "%{MainCppFileName}"
},
{
"source": "main.qml.tpl",
"target": "main.qml",
"openInEditor": true
},
{
"source": "../qtquickcontrols2.conf",
"target": "qtquickcontrols2.conf"
},
{
"source": "qml.qrc",
"condition": "%{JS: !value('QtVersion').IsQt6}"
},
{
"source": "../../translation.ts",
"target": "%{TsFileName}",
"condition": "%{HasTranslation}"
},
{
"source": "../../git.ignore",
"target": ".gitignore",
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}
]
}

View File

@@ -1,14 +0,0 @@
import QtQuick %{QtQuickVersion}
import QtQuick.Controls %{QtQuickControlsVersion}
Page {
width: 600
height: 400
title: qsTr("Home")
Label {
text: qsTr("You are on the home page.")
anchors.centerIn: parent
}
}

View File

@@ -1,14 +0,0 @@
import QtQuick %{QtQuickVersion}
import QtQuick.Controls %{QtQuickControlsVersion}
Page {
width: 600
height: 400
title: qsTr("Page 1")
Label {
text: qsTr("You are on Page 1.")
anchors.centerIn: parent
}
}

View File

@@ -1,14 +0,0 @@
import QtQuick %{QtQuickVersion}
import QtQuick.Controls %{QtQuickControlsVersion}
Page {
width: 600
height: 400
title: qsTr("Page 2")
Label {
text: qsTr("You are on Page 2.")
anchors.centerIn: parent
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

View File

@@ -1,99 +0,0 @@
import QtQuick %{QtQuickVersion}
import QtQuick.Controls %{QtQuickControlsVersion}
@if %{UseVirtualKeyboard}
import %{QtQuickVirtualKeyboardImport}
@endif
ApplicationWindow {
id: window
width: 640
height: 480
visible: true
title: qsTr("Stack")
header: ToolBar {
contentHeight: toolButton.implicitHeight
ToolButton {
id: toolButton
text: stackView.depth > 1 ? "\\u25C0" : "\\u2630"
font.pixelSize: Qt.application.font.pixelSize * 1.6
onClicked: {
if (stackView.depth > 1) {
stackView.pop()
} else {
drawer.open()
}
}
}
Label {
text: stackView.currentItem.title
anchors.centerIn: parent
}
}
Drawer {
id: drawer
width: window.width * 0.66
height: window.height
Column {
anchors.fill: parent
ItemDelegate {
text: qsTr("Page 1")
width: parent.width
onClicked: {
stackView.push("Page1Form.qml")
drawer.close()
}
}
ItemDelegate {
text: qsTr("Page 2")
width: parent.width
onClicked: {
stackView.push("Page2Form.qml")
drawer.close()
}
}
}
}
StackView {
id: stackView
initialItem: "HomeForm.qml"
anchors.fill: parent
}
@if %{UseVirtualKeyboard}
InputPanel {
id: inputPanel
z: 99
x: 0
y: window.height
width: window.width
states: State {
name: "visible"
when: inputPanel.active
PropertyChanges {
target: inputPanel
y: window.height - inputPanel.height
}
}
transitions: Transition {
from: ""
to: "visible"
reversible: true
ParallelAnimation {
NumberAnimation {
properties: "y"
duration: 250
easing.type: Easing.InOutQuad
}
}
}
}
@endif
}

View File

@@ -1,9 +0,0 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>HomeForm.ui.qml</file>
<file>Page1Form.ui.qml</file>
<file>Page2Form.ui.qml</file>
<file>qtquickcontrols2.conf</file>
</qresource>
</RCC>

View File

@@ -1,315 +0,0 @@
{
"version": 1,
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
"id": "V.QtQuickApplicationStack",
"category": "E.ApplicationQtQuick",
"trDescription": "Creates a Qt Quick Controls application with a StackView to display content, and a Drawer and ToolBar for navigation.",
"trDisplayName": "Qt Quick Application - Stack",
"trDisplayCategory": "Application (Qt Quick)",
"icon": "icon.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.7" ],
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "IsQt6", "value": "%{JS: value('QtVersion').IsQt6}" },
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
{ "key": "QtQuickControlsVersion", "value": "%{JS: value('QtVersion').QtQuickControlsVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
{ "key": "QtQuickFeature", "value": "%{JS: (value('QtQuickVersion')=='') ? 'QtSupport.Wizards.FeatureQt.6.2' : 'QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}'}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
{ "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" },
{ "key": "AdditionalQmlFiles", "value": "HomeForm.qml Page1Form.qml Page2Form.qml" },
{ "key": "AdditionalQmlFilesQbs", "value": ", \"HomeForm.qml\", \"Page1Form.qml\", \"Page2Form.qml\"" }
],
"pages":
[
{
"trDisplayName": "Project Location",
"trShortTitle": "Location",
"typeId": "Project"
},
{
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
"name": "BuildSystem",
"trDisplayName": "Build system:",
"type": "ComboBox",
"persistenceKey": "BuildSystemType",
"data":
{
"index": 0,
"items":
[
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
}
]
},
{
"trDisplayName": "Define Project Details",
"trShortTitle": "Details",
"typeId": "Fields",
"data":
[
{
"name": "QtVersion",
"trDisplayName": "Minimal required Qt version:",
"type": "ComboBox",
"persistenceKey": "QtQuick.minimumQtVersion",
"data":
{
"index": 1,
"items":
[
{
"trKey": "Qt 6.2",
"value":
{
"QtQuickVersion": "",
"QtQuickControlsVersion": "",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard",
"IsQt6": true
}
},
{
"trKey": "Qt 5.15",
"value":
{
"QtQuickVersion": "2.15",
"QtQuickControlsVersion": "2.15",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.15",
"IsQt6": false
}
},
{
"trKey": "Qt 5.14",
"value":
{
"QtQuickVersion": "2.14",
"QtQuickControlsVersion": "2.14",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.14",
"IsQt6": false
}
},
{
"trKey": "Qt 5.13",
"value":
{
"QtQuickVersion": "2.13",
"QtQuickControlsVersion": "2.13",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4",
"IsQt6": false
}
},
{
"trKey": "Qt 5.12",
"value":
{
"QtQuickVersion": "2.12",
"QtQuickControlsVersion": "2.5",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4",
"IsQt6": false
}
}
]
}
},
{
"name": "ControlsStyle",
"trDisplayName": "Qt Quick Controls Style:",
"type": "ComboBox",
"data":
{
"index": 0,
"items":
[
{
"trKey": "Material Light",
"value":
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Material Dark",
"value":
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal Light",
"value":
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Universal Dark",
"value":
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal System",
"value":
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "System"
}
},
{
"trKey": "Fusion",
"value":
{
"QtQuickControlsStyle": "Fusion",
"QtQuickControlsStyleTheme": ""
}
},
{
"trKey": "Imagine",
"value":
{
"QtQuickControlsStyle": "Imagine",
"QtQuickControlsStyleTheme": ""
}
}
]
}
},
{
"name": "UseVirtualKeyboard",
"trDisplayName": "Use Qt Virtual Keyboard",
"type": "CheckBox",
"persistenceKey": "QtQuick.UseVirtualKeyboard.%{UseVirtualKeyboardByDefault}",
"data":
{
"checked": "%{UseVirtualKeyboardByDefault}"
}
}
]
},
{
"trDisplayName": "Translation File",
"trShortTitle": "Translation",
"typeId": "QtTranslation"
},
{
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: !value('IsSubproject')}",
"data": {
"projectFilePath": "%{ProjectFile}",
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
}
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],
"generators":
[
{
"typeId": "File",
"data":
[
{
"source": "../app.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "%{JS: value('QtVersion').IsQt6 ? '../CMakeLists.6.x.txt' : '../CMakeLists.txt'}",
"target": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "../app.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "../main.cpp",
"target": "%{MainCppFileName}"
},
{
"source": "main.qml.tpl",
"target": "main.qml",
"openInEditor": true
},
{
"source": "HomeForm.qml.tpl",
"target": "HomeForm.qml"
},
{
"source": "Page1Form.qml.tpl",
"target": "Page1Form.qml"
},
{
"source": "Page2Form.qml.tpl",
"target": "Page2Form.qml"
},
{
"source": "../qtquickcontrols2.conf",
"target": "qtquickcontrols2.conf"
},
{
"source": "qml.qrc",
"condition": "%{JS: !value('QtVersion').IsQt6}"
},
{
"source": "../../translation.ts",
"target": "%{TsFileName}",
"condition": "%{HasTranslation}"
},
{
"source": "../../git.ignore",
"target": ".gitignore",
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}
]
}

View File

@@ -1,18 +0,0 @@
import QtQuick %{QtQuickVersion}
import QtQuick.Controls %{QtQuickControlsVersion}
Page {
width: 600
height: 400
header: Label {
text: qsTr("Page 1")
font.pixelSize: Qt.application.font.pixelSize * 2
padding: 10
}
Label {
text: qsTr("You are on Page 1.")
anchors.centerIn: parent
}
}

View File

@@ -1,18 +0,0 @@
import QtQuick %{QtQuickVersion}
import QtQuick.Controls %{QtQuickControlsVersion}
Page {
width: 600
height: 400
header: Label {
text: qsTr("Page 2")
font.pixelSize: Qt.application.font.pixelSize * 2
padding: 10
}
Label {
text: qsTr("You are on Page 2.")
anchors.centerIn: parent
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,70 +0,0 @@
import QtQuick %{QtQuickVersion}
import QtQuick.Controls %{QtQuickControlsVersion}
@if %{UseVirtualKeyboard}
import %{QtQuickVirtualKeyboardImport}
@endif
ApplicationWindow {
@if %{UseVirtualKeyboard}
id: window
@endif
width: 640
height: 480
visible: true
title: qsTr("Tabs")
SwipeView {
id: swipeView
anchors.fill: parent
currentIndex: tabBar.currentIndex
Page1Form {
}
Page2Form {
}
}
footer: TabBar {
id: tabBar
currentIndex: swipeView.currentIndex
TabButton {
text: qsTr("Page 1")
}
TabButton {
text: qsTr("Page 2")
}
}
@if %{UseVirtualKeyboard}
InputPanel {
id: inputPanel
z: 99
x: 0
y: window.height
width: window.width
states: State {
name: "visible"
when: inputPanel.active
PropertyChanges {
target: inputPanel
y: window.height - inputPanel.height
}
}
transitions: Transition {
from: ""
to: "visible"
reversible: true
ParallelAnimation {
NumberAnimation {
properties: "y"
duration: 250
easing.type: Easing.InOutQuad
}
}
}
}
@endif
}

View File

@@ -1,8 +0,0 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>Page1Form.ui.qml</file>
<file>Page2Form.ui.qml</file>
<file>qtquickcontrols2.conf</file>
</qresource>
</RCC>

View File

@@ -1,310 +0,0 @@
{
"version": 1,
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
"id": "V.QtQuickApplicationSwipe",
"category": "E.ApplicationQtQuick",
"trDescription": "Creates a Qt Quick Controls application with a SwipeView for navigation.",
"trDisplayName": "Qt Quick Application - Swipe",
"trDisplayCategory": "Application (Qt Quick)",
"icon": "icon.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.7" ],
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "IsQt6", "value": "%{JS: value('QtVersion').IsQt6}" },
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
{ "key": "QtQuickControlsVersion", "value": "%{JS: value('QtVersion').QtQuickControlsVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
{ "key": "QtQuickFeature", "value": "%{JS: (value('QtQuickVersion')=='') ? 'QtSupport.Wizards.FeatureQt.6.2' : 'QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}'}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
{ "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" },
{ "key": "AdditionalQmlFiles", "value": "Page1Form.qml Page2Form.qml" },
{ "key": "AdditionalQmlFilesQbs", "value": ", \"Page1Form.qml\", \"Page2Form.qml\"" }
],
"pages":
[
{
"trDisplayName": "Project Location",
"trShortTitle": "Location",
"typeId": "Project"
},
{
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
"name": "BuildSystem",
"trDisplayName": "Build system:",
"type": "ComboBox",
"persistenceKey": "BuildSystemType",
"data":
{
"index": 0,
"items":
[
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
}
]
},
{
"trDisplayName": "Define Project Details",
"trShortTitle": "Details",
"typeId": "Fields",
"data":
[
{
"name": "QtVersion",
"trDisplayName": "Minimal required Qt version:",
"type": "ComboBox",
"persistenceKey": "QtQuick.minimumQtVersion",
"data":
{
"index": 1,
"items":
[
{
"trKey": "Qt 6.2",
"value":
{
"QtQuickVersion": "",
"QtQuickControlsVersion": "",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard",
"IsQt6": true
}
},
{
"trKey": "Qt 5.15",
"value":
{
"QtQuickVersion": "2.15",
"QtQuickControlsVersion": "2.15",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.15",
"IsQt6": false
}
},
{
"trKey": "Qt 5.14",
"value":
{
"QtQuickVersion": "2.14",
"QtQuickControlsVersion": "2.14",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.14",
"IsQt6": false
}
},
{
"trKey": "Qt 5.13",
"value":
{
"QtQuickVersion": "2.13",
"QtQuickControlsVersion": "2.13",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4",
"IsQt6": false
}
},
{
"trKey": "Qt 5.12",
"value":
{
"QtQuickVersion": "2.12",
"QtQuickControlsVersion": "2.5",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4",
"IsQt6": false
}
}
]
}
},
{
"name": "ControlsStyle",
"trDisplayName": "Qt Quick Controls Style:",
"type": "ComboBox",
"data":
{
"index": 0,
"items":
[
{
"trKey": "Material Light",
"value":
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Material Dark",
"value":
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal Light",
"value":
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Universal Dark",
"value":
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal System",
"value":
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "System"
}
},
{
"trKey": "Fusion",
"value":
{
"QtQuickControlsStyle": "Fusion",
"QtQuickControlsStyleTheme": ""
}
},
{
"trKey": "Imagine",
"value":
{
"QtQuickControlsStyle": "Imagine",
"QtQuickControlsStyleTheme": ""
}
}
]
}
},
{
"name": "UseVirtualKeyboard",
"trDisplayName": "Use Qt Virtual Keyboard",
"type": "CheckBox",
"persistenceKey": "QtQuick.UseVirtualKeyboard.%{UseVirtualKeyboardByDefault}",
"data":
{
"checked": "%{UseVirtualKeyboardByDefault}"
}
}
]
},
{
"trDisplayName": "Translation File",
"trShortTitle": "Translation",
"typeId": "QtTranslation"
},
{
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: !value('IsSubproject')}",
"data": {
"projectFilePath": "%{ProjectFile}",
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
}
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],
"generators":
[
{
"typeId": "File",
"data":
[
{
"source": "../app.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "%{JS: value('QtVersion').IsQt6 ? '../CMakeLists.6.x.txt' : '../CMakeLists.txt'}",
"target": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "../app.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "../main.cpp",
"target": "%{MainCppFileName}"
},
{
"source": "main.qml.tpl",
"target": "main.qml",
"openInEditor": true
},
{
"source": "Page1Form.qml.tpl",
"target": "Page1Form.qml"
},
{
"source": "Page2Form.qml.tpl",
"target": "Page2Form.qml"
},
{
"source": "../qtquickcontrols2.conf",
"target": "qtquickcontrols2.conf"
},
{
"source": "qml.qrc",
"condition": "%{JS: !value('QtVersion').IsQt6}"
},
{
"source": "../../translation.ts",
"target": "%{TsFileName}",
"condition": "%{HasTranslation}"
},
{
"source": "../../git.ignore",
"target": ".gitignore",
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}
]
}

View File

@@ -2352,265 +2352,6 @@
ry="3" /> ry="3" />
</g> </g>
</g> </g>
<g
id="share/qtcreator/templates/wizards/projects/qtquickapplication/swipe/icon"
transform="translate(-57,-82)">
<use
style="display:inline"
x="0"
y="0"
xlink:href="#transparentBackgroundRect_60_60"
id="use5906-0-4-3-5-6-5-1"
width="100%"
height="100%"
transform="translate(117,142)" />
<use
style="display:inline"
x="0"
y="0"
xlink:href="#wizardicons_laptop_and_mobile"
id="use6044"
width="100%"
height="100%"
transform="translate(94)" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path9531-1-3"
d="M 145,329.99956 V 334 h 16 v -4.00044 z"
style="fill:#3a4055" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="rect4410-0-4-4-0-4-2-8"
d="m 145,330 h 7 v 4 h -7 z"
style="display:inline;opacity:1;fill:#cecfd5;fill-opacity:1" />
<path
sodipodi:nodetypes="csccscc"
inkscape:connector-curvature="0"
id="path9531-13"
d="m 121,337 v 4 c 0,1.141 0.859,2 2,2 h 18 c 1.141,0 1.88647,-0.86466 2,-2 v -4 z"
style="fill:#3a4055" />
<rect
style="fill:#cecfd5"
id="rect4410-0-4-4-0-4-3"
width="6"
height="6"
x="129"
y="337" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path4418-6-9-6-7-6-9-5-6"
d="m 126.99947,323.99683 v -7 l -5,3.49999 z"
style="fill:#6b7080" />
<use
height="100%"
width="100%"
transform="matrix(-1,0,0,1,264,0)"
id="use9525-5"
xlink:href="#path4418-6-9-6-7-6-9-5-6"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="matrix(-1,0,0,1,282,-1)"
id="use9527-7"
xlink:href="#path4418-6-9-6-7-6-9-5-6"
y="0"
x="0" />
</g>
<g
id="share/qtcreator/templates/wizards/projects/qtquickapplication/stack/icon"
transform="translate(-91,-82)">
<use
style="display:inline"
x="0"
y="0"
xlink:href="#transparentBackgroundRect_60_60"
id="use5906-0-4-3-5-6-5-1-4"
width="100%"
height="100%"
transform="translate(211,142)" />
<use
style="display:inline"
x="0"
y="0"
xlink:href="#wizardicons_laptop_and_mobile"
id="use6076"
width="100%"
height="100%"
transform="translate(188)" />
<path
style="fill:#3a4055"
d="m 215,309 v -6 c 0,-1.141 0.859,-2 2,-2 h 18 c 1.141,0 2.09475,0.86294 2,2 v 6 z"
id="path9531-10-6-4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csccscc" />
<path
style="fill:#ffffff;fill-opacity:1"
d="m 220,307 v -4 l -3,2 z"
id="path6837-5-2-1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<g
id="g6132"
transform="translate(23,18.5)">
<rect
style="fill:#53586b"
id="rect6831-7-1-5"
width="9"
height="11"
x="197"
y="298.5" />
<rect
style="fill:#6b7080"
id="rect6833-6-9-4"
width="9"
height="11"
x="199"
y="300.5" />
<rect
style="fill:#cecfd5"
id="rect6835-3-6-1"
width="9"
height="11"
x="201"
y="302.5" />
</g>
<use
style="display:inline"
x="0"
y="0"
xlink:href="#g6132"
id="use6134"
width="100%"
height="100%"
transform="matrix(0,1,1,0,-78,95)" />
</g>
<g
id="share/qtcreator/templates/wizards/projects/qtquickapplication/scroll/icon"
transform="translate(-125,-83)">
<use
style="display:inline"
x="0"
y="0"
xlink:href="#transparentBackgroundRect_60_60"
id="use5906-0-4-3-5-6-7"
width="100%"
height="100%"
transform="translate(305,143)" />
<use
style="display:inline"
x="0"
y="0"
xlink:href="#wizardicons_laptop_and_mobile"
id="use6093"
width="100%"
height="100%"
transform="translate(282,1)" />
<g
transform="translate(26,16)"
style="display:inline"
id="g9772-1">
<rect
style="opacity:0.62999998;fill:#cecfd5"
id="rect6577-8-4-14-9"
width="10"
height="2"
x="292"
y="292" />
<circle
cy="293"
cx="287"
id="path7718-31-9"
style="fill:#848895"
r="2.5" />
</g>
<use
x="0"
y="0"
xlink:href="#g9772-1"
id="use9821"
transform="translate(0,7)"
width="100%"
height="100%" />
<use
x="0"
y="0"
xlink:href="#g9772-1"
id="use9823"
transform="translate(0,14)"
width="100%"
height="100%" />
<use
x="0"
y="0"
xlink:href="#g9772-1"
id="use9825"
transform="translate(0,21)"
width="100%"
height="100%" />
<use
x="0"
y="0"
xlink:href="#g9772-1"
id="use9827"
transform="translate(0,28)"
width="100%"
height="100%" />
<g
transform="translate(47,20)"
style="display:inline"
id="g9772-1-4">
<rect
style="opacity:0.62999998;fill:#cecfd5"
id="rect6577-8-4-14-9-9"
width="9"
height="1"
x="292"
y="292" />
<circle
cy="292.46967"
cx="288.56888"
id="path7718-31-9-5"
style="fill:#848895"
r="1.5" />
</g>
<use
x="0"
y="0"
xlink:href="#g9772-1-4"
id="use6181"
width="100%"
height="100%"
transform="translate(0,5)" />
<use
x="0"
y="0"
xlink:href="#g9772-1-4"
id="use6183"
width="100%"
height="100%"
transform="translate(0,10)" />
<use
x="0"
y="0"
xlink:href="#g9772-1-4"
id="use6185"
transform="translate(0,15)"
width="100%"
height="100%" />
<use
x="0"
y="0"
xlink:href="#g9772-1-4"
id="use6187"
transform="translate(0,20)"
width="100%"
height="100%" />
</g>
<g <g
id="share/qtcreator/templates/wizards/global/consoleapplication" id="share/qtcreator/templates/wizards/global/consoleapplication"
transform="translate(-185,-78)"> transform="translate(-185,-78)">

Before

Width:  |  Height:  |  Size: 383 KiB

After

Width:  |  Height:  |  Size: 376 KiB