forked from zhengtianzuo/QtQuickExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.qml
More file actions
39 lines (36 loc) · 781 Bytes
/
main.qml
File metadata and controls
39 lines (36 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*!
*@file main.qml
*@brief 主文件
*@version 1.0
*@section LICENSE Copyright (C) 2003-2103 CamelSoft Corporation
*@author zhengtianzuo
*/
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
import Qt.labs.platform 1.0
ApplicationWindow {
id: root
visible: true
width: 400
height: 300
title: qsTr("Qml选择颜色对话框")
color: colorDialog.color
Button{
text: qsTr("选择颜色")
height: 48
width: 120
anchors.centerIn: parent
MouseArea{
anchors.fill: parent
onClicked: {
colorDialog.open();
}
}
}
ColorDialog {
id: colorDialog
title: qsTr("选择颜色")
color: "#AAAAAA"
}
}