-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
70 lines (64 loc) · 1.65 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Window 2.12
import QtGraphicalEffects 1.0
import "Components/"
import "Layouts/"
Window {
id: mainWindow
visible: true
width: 480
height: 720
title: qsTr("Qml Gallery")
color: materialStatics.grey_100_
flags: Qt.Window | Qt.WindowTitleHint | Qt.WindowSystemMenuHint
| (Qt.platform.os === "ios" ? Qt.MaximizeUsingFullscreenGeometryHint : 0)
Materials {
id: materialStatics
}
StackView {
id: stackview
anchors.fill: parent
initialItem: "qrc:/Layouts/AppMainWindow.qml"
Keys.onBackPressed: pop()
focus: true
pushEnter: Transition {
PropertyAnimation {
property: "opacity"
from: 0
to: 1
duration: 100
}
}
pushExit: Transition {
PropertyAnimation {
property: "opacity"
from: 1
to: 0
duration: 0
}
}
popEnter: Transition {
PropertyAnimation {
property: "opacity"
from: 0
to: 1
duration: 200
}
}
popExit: Transition {
PropertyAnimation {
property: "opacity"
from: 1
to: 0
duration: 0
}
}
}
function loadLayout(path) {
var absPath = "qrc:/Layouts/" + path
console.log("loading : ", absPath)
var component = Qt.createComponent(absPath)
stackview.push(component)
}
}