Commit 7a470e97 authored by Thomas Hartmann's avatar Thomas Hartmann

Updating the .qrc based wizards to use .ui.qml files

Change-Id: I178b9cdbb895ef221d74b9aa282163307550fd13
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 44ba5ce3
import QtQuick 2.3
Rectangle {
property alias mouseArea: mouseArea
width: 360
height: 360
MouseArea {
id: mouseArea
anchors.fill: parent
}
Text {
anchors.centerIn: parent
text: "Hello World"
}
}
import QtQuick 2.4
import QtQuick.Window 2.2
Window {
visible: true
width: 360
height: 360
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
MainForm {
mouseArea.onClicked: {
Qt.quit();
}
Text {
text: qsTr("Hello World")
anchors.centerIn: parent
}
}
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>mainForm.ui.qml</file>
</qresource>
</RCC>
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="BV"
featuresRequired="QtSupport.Wizards.FeatureQtQuick.2.4"
featuresRequired="QtSupport.Wizards.FeatureQtQuick.2.4, QtSupport.Wizards.FeatureQtQuick.UiFiles"
qrcdeployment="qrcdeployment.pri"
stubversionminor="5">
<displayname>Qt Quick 2.4</displayname>
<description>Creates a deployable Qt Quick 2 application using the QtQuick 2.4 import. Requires Qt 5.4 or newer.</description>
<description>Creates a deployable Qt Quick 2 application that contains a .ui.qml file using the QtQuick 2.4 import. Requires Qt 5.4 or newer.</description>
</template>
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
Item {
width: 640
height: 480
property alias button3: button3
property alias button2: button2
property alias button1: button1
RowLayout {
anchors.centerIn: parent
Button {
id: button1
text: qsTr("Press Me 1")
}
Button {
id: button2
text: qsTr("Press Me 2")
}
Button {
id: button3
text: qsTr("Press Me 3")
}
}
}
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
ApplicationWindow {
visible: true
title: qsTr("Hello World")
width: 640
height: 480
title: qsTr("Hello World")
menuBar: MenuBar {
Menu {
title: qsTr("File")
title: qsTr("&File")
MenuItem {
text: qsTr("&Open")
onTriggered: console.log("Open action triggered");
onTriggered: messageDialog.show(qsTr("Open action triggered"));
}
MenuItem {
text: qsTr("Exit")
text: qsTr("E&xit")
onTriggered: Qt.quit();
}
}
}
Text {
text: qsTr("Hello World")
anchors.centerIn: parent
MainForm {
anchors.fill: parent
button1.onClicked: messageDialog.show(qsTr("Button 1 pressed"))
button2.onClicked: messageDialog.show(qsTr("Button 2 pressed"))
button3.onClicked: messageDialog.show(qsTr("Button 3 pressed"))
}
MessageDialog {
id: messageDialog
title: qsTr("May I have your attention, please?")
function show(caption) {
messageDialog.text = caption;
messageDialog.open();
}
}
}
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>mainForm.ui.qml</file>
</qresource>
</RCC>
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="AW"
featuresRequired="QtSupport.Wizards.FeatureQtQuick.Controls.1.3"
featuresRequired="QtSupport.Wizards.FeatureQtQuick.Controls.1.3, QtSupport.Wizards.FeatureQtQuick.UiFiles"
qrcdeployment="qrcdeployment.pri"
stubversionminor="1">
<displayname>Qt Quick Controls 1.3</displayname>
<description>Creates a deployable Qt Quick 2 application using Qt Quick Controls. Requires Qt 5.4 or newer.</description>
<description>Creates a deployable Qt Quick 2 application that contains a .ui.qml file and uses Qt Quick Controls. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. This project requires that you have installed Qt Quick Controls for your Qt version. Requires Qt 5.4 or newer.</description>
</template>
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