main.qml 文件
点击(此处)折叠或打开
-
import QtQuick 2.5
-
import QtQuick.Window 2.2
-
import QtQuick.Controls 1.2
-
-
-
Window {
-
visible: true
-
width: 640
-
height: 480
-
//flags: Qt.FramelessWindowHint
-
title: qsTr("Hello World")
-
-
/*
-
MainForm {
-
anchors.fill: parent
-
mouseArea.onClicked: {
-
Qt.quit();
-
}
-
-
}
-
*/
-
-
Test2 {id: test2window}
-
-
-
Button {
-
id: button2
-
x: 224
-
y: 145
-
width: 110
-
height: 36
-
text: qsTr("Show")
-
-
onClicked: {
-
//Qt.quit();
-
//Test2.show();
-
test2window.show();
-
}
-
-
}
-
-
-
Label {
-
id: label1
-
anchors{
-
left: parent.left;
-
leftMargin: 30
-
top: parent.top
-
topMargin: 50
-
}
-
font.pixelSize: 16
-
text: "Name"
-
}
- }
点击(此处)折叠或打开
-
import QtQuick 2.5
-
import QtQuick.Window 2.2
-
import QtQuick.Controls 1.2
-
-
Window {
-
id: test2window
-
width: 640
-
height: 480
-
flags: Qt.FramelessWindowHint
-
-
Button {
-
id: button2
-
x: 224
-
y: 145
-
width: 110
-
height: 36
-
text: qsTr("Second Frame")
-
-
onClicked: {
-
close();
-
}
-
-
}
- }
工程目录
