Commit d7105cc2 authored by Thomas Hartmann's avatar Thomas Hartmann

Wizard for ui.qml file based project.

Change-Id: Id0f61efce0ae47c28eb2f5fbcee5468dc5c339ca
Reviewed-by: default avatarKai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@digia.com>
parent cf0f2e46
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
Rectangle {
width: 360
height: 360
ApplicationWindow {
title: qsTr("Hello World")
width: 640
height: 480
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
menuBar: MenuBar {
Menu {
title: qsTr("&File")
MenuItem {
text: qsTr("&Open")
onTriggered: messageDialog.show(qsTr("Open action triggered"))
}
MenuItem {
text: qsTr("E&xit")
onTriggered: Qt.quit();
}
}
}
Text {
anchors.centerIn: parent
text: "Hello World"
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();
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="BV"
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick.2.4">
<displayname>Qt Quick 2.4</displayname>
<description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of project. Requires Qt 5.4 or newer.</description>
<template openeditor="main.qml" priority="AX"
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick.Controls.1.3 QtSupport.Wizards.FeatureQtQuick.UiFiles">
<displayname>Qt Quick Controls using .ui.qml files</displayname>
<description>Creates a Qt Quick 2 UI project that contains a ui 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