Commit 462948f5 authored by Tim Jenssen's avatar Tim Jenssen Committed by Alessandro Portale

Wizards: remove Qt Labs Controls wizard

It was just a testballoon and they are living as
Qt Quick Controls 2 in newer Qt versions.

Change-Id: I9645a092dcddf498df93f13a543a6bb92d8a419d
Reviewed-by: Alessandro Portale's avatarAlessandro Portale <alessandro.portale@qt.io>
parent 412d7b22
import QtQuick %{QtQuickVersion}
Page1Form {
button1.onClicked: {
console.log("Button Pressed. Entered text: " + textField1.text);
}
}
import QtQuick %{QtQuickVersion}
import Qt.labs.controls %{QtLabsControlsVersion}
import QtQuick.Layouts %{QtQuickLayoutsVersion}
Item {
property alias textField1: textField1
property alias button1: button1
RowLayout {
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 20
anchors.top: parent.top
TextField {
id: textField1
placeholderText: qsTr("Text Field")
}
Button {
id: button1
text: qsTr("Press Me")
}
}
}
QT += qml quick
CONFIG += c++11
SOURCES += %{MainCppFileName}
RESOURCES += qml.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
%{Cpp:LicenseTemplate}\
%{JS: QtSupport.qtIncludes([], ["QtGui/QGuiApplication", "QtQml/QQmlApplicationEngine"])}
int main(int argc, char *argv[])
{
@if %{UseVirtualKeyboard}
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
@endif
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
return app.exec();
}
import QtQuick %{QtQuickVersion}
import QtQuick.Layouts %{QtQuickLayoutsVersion}
import Qt.labs.controls %{QtLabsControlsVersion}
@if %{UseVirtualKeyboard}
import QtQuick.Enterprise.VirtualKeyboard %{QtQuickVirtualKeyboardVersion}
@endif
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
@if %{UseVirtualKeyboard}
id: root
@endif
SwipeView {
id: swipeView
anchors.fill: parent
currentIndex: tabBar.currentIndex
Page1 {
}
Page {
Label {
text: qsTr("Second page")
anchors.centerIn: parent
}
}
}
footer: TabBar {
id: tabBar
currentIndex: swipeView.currentIndex
TabButton {
text: qsTr("First")
}
TabButton {
text: qsTr("Second")
}
}
@if %{UseVirtualKeyboard}
InputPanel {
id: inputPanel
z: 99
x: 0
y: root.height
width: root.width
states: State {
name: "visible"
when: inputPanel.active
PropertyChanges {
target: inputPanel
y: root.height - inputPanel.height
}
}
transitions: Transition {
from: ""
to: "visible"
reversible: true
ParallelAnimation {
NumberAnimation {
properties: "y"
duration: 250
easing.type: Easing.InOutQuad
}
}
}
}
@endif
}
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>Page1.qml</file>
<file>Page1Form.ui.qml</file>
</qresource>
</RCC>
{
"version": 1,
"supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ],
"id": "W.QtLabsControlsApplication",
"category": "F.Application",
"trDescription": "Creates a deployable Qt Quick 2 application using Qt Labs Controls.<br/><br/><b>Note:</b> Qt Labs Controls are only available with Qt 5.6. Choose <em>Qt Quick Controls 2 Application</em> when targeting Qt 5.7 or later.",
"trDisplayName": "Qt Labs Controls Application",
"trDisplayCategory": "Application",
"icon": "../qtquickapplication/qml_wizard.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.labs.controls.1.0" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}",
"options":
[
{ "key": "ProFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
{ "key": "QtQuickVersion", "value": "2.6" },
{ "key": "QtLabsControlsVersion", "value": "1.0" },
{ "key": "QtQuickDialogsVersion", "value": "1.0" },
{ "key": "QtQuickLayoutsVersion", "value": "1.0" },
{ "key": "QtQuickVirtualKeyboardVersion", "value": "2.0" },
{ "key": "UseVirtualKeyboard", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0}" }
],
"pages":
[
{
"trDisplayName": "Project Location",
"trShortTitle": "Location",
"typeId": "Project"
},
{
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{IsTopLevelProject}",
"data": { "projectFilePath": "%{ProFileName}" }
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],
"generators":
[
{
"typeId": "File",
"data":
[
{
"source": "app.pro",
"target": "%{ProFileName}",
"openAsProject": true
},
{
"source": "main.cpp",
"target": "%{MainCppFileName}"
},
{
"source": "main.qml.tpl",
"target": "main.qml",
"openInEditor": true
},
{
"source": "Page1.qml.tpl",
"target": "Page1.qml"
},
{
"source": "Page1Form.ui.qml.tpl",
"target": "Page1Form.ui.qml"
},
{
"source": "qml.qrc"
},
{
"source": "../../git.ignore",
"target": "%{ProjectDirectory}/.gitignore",
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
}
]
}
]
}
......@@ -3,7 +3,7 @@
"supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ],
"id": "V.QtQuickControls2Application",
"category": "F.Application",
"trDescription": "Creates a deployable Qt Quick 2 application using Qt Quick Controls 2.<br/><br/><b>Note:</b> Qt Quick Controls 2 are available with Qt 5.7 and later. Choose <em>Qt Labs Controls Application</em> when targeting Qt 5.6.",
"trDescription": "Creates a deployable Qt Quick 2 application using Qt Quick Controls 2.<br/><br/><b>Note:</b> Qt Quick Controls 2 are available with Qt 5.7 and later.",
"trDisplayName": "Qt Quick Controls 2 Application",
"trDisplayCategory": "Application",
"icon": "../qtquickapplication/qml_wizard.png",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment