-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.qml
35 lines (29 loc) · 789 Bytes
/
main.qml
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
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.5
import QtWinExtras 1.0 as Win
ApplicationWindow{
visible: true
width: 640
height: 480
title: qsTr("Hello World")
//flags: Qt.FramelessWindowHint
Rectangle {
id:root
anchors.centerIn: parent
width: 100
height: 100
color:"lightblue"
Label {
text: "Click the button one time to get window colours, two times to set them green"
anchors.horizontalCenter: parent.horizontalCenter
y:120
}
Button {
anchors.fill: parent
text: "button"
onClicked: myObject.getCurrentColor()
onDoubleClicked:myObject.setCurrentWindowColor()
}
}
}