-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSwipeMain.qml
69 lines (65 loc) · 1.67 KB
/
SwipeMain.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
import QtQuick 2.8
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.3
Page {
id: page
width: 720
height: 1280
property real a_max: Math.max(width,height)
//property real a_min: Math.min(width,height)
property real a_pd: 0
//property real a_sqrt: Math.min(Math.sqrt(a_max/1280*a_min/720),a_pd/12)
SwipeView {
id: swipeView
objectName: "swipeView"
anchors.fill: parent
currentIndex: 0
onCurrentIndexChanged: {
tabBar.currentIndex = currentIndex
}
Main {
a_pd: page.a_pd
id: main
}
MoreSearch {
a_pd: page.a_pd
id: moreSearch
}
History {
a_pd: page.a_pd
id: history
}
More {
a_pd: page.a_pd
id: more
}
}
footer: TabBar {
id: tabBar
currentIndex: swipeView.currentIndex
onCurrentIndexChanged: swipeView.currentIndex = currentIndex
width: page.width
height: 105*Math.min(page.a_max/1280,a_pd/12)
background: Rectangle {
color: "#f0f0f0"
}
spacing: 2
MTabButton {
height: parent.height
text: qsTr("一键搜索")
}
MTabButton {
height: parent.height
text: qsTr("更多搜索")
}
MTabButton {
height: parent.height
text: qsTr("历史记录")
}
MTabButton {
height: parent.height
text: qsTr("更多")
}
}
}