-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
42 lines (40 loc) · 1.14 KB
/
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
36
37
38
39
40
41
42
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Window 2.2
import "QMLs"
ApplicationWindow {
id: rootApp
objectName: "rootApp"
title: qsTr("Total Control")
property int aWidth: 480
property int aHeight: 800
property string backGroundColor: "#FFC107"
property string otherColor: "#9c27b0"
property string menuColor: "#ededed"
width: aWidth
height: aHeight
visible: true
Loader {
id: loader
objectName: "loader"
anchors.fill: parent
focus: true
onLoaded: {
if(loader.source == "qrc:/QMLs/Welcome.qml") {
welcome.loaded();
}
if(loader.source == "qrc:/QMLs/Home.qml") {
home.loaded();
}
if(loader.source == "qrc:/QMLs/Lists.qml")
list.loaded();
}
onFocusChanged: console.log("focus", focus);
Keys.onReleased: {
if (event.key === Qt.Key_Back) {
console.log("Back button captured - wunderbar !")
event.accepted = true
}
}
}
}