-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPage5Form.qml
168 lines (149 loc) · 4.14 KB
/
Page5Form.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
Row {
id: page5Row1
spacing: 2
// Rectangle { color: "red"; width: 50; height: 50 }
Rectangle {
// width: 180;
width: parent.width/3
height: 100;
color: "red";
ListView {
// width: 180;
width: parent.width
height: 100
model: Page5ListModel{}
delegate: Text {
text: name + ": " + number
}
}
}
Rectangle {
// width: 180;
width: parent.width/3
height: 100
color: "green";
ListView {
// width: 180;
width: parent.width
height: 100
model: Page5ListModel{}
delegate: Text {
text: name + ": " + number
}
}
}
Rectangle {
// width: 180;
width: parent.width/3
// height: 200
height: parent.height / 2
color: 'teal'
Component {
id: contactDelegate
Item {
// width: 180;
width: parent.width
height: 60
Column {
Text { text: '<b>Name:</b> ' + name }
Text { text: '<b>Number:</b> ' + number }
Button {
id: control
// text: qsTr("Button")
font.pointSize: 16
height: 20
focus: true
text: activeFocus ? "I have active focus!" : "I do not have active focus"
}
}
}
}
ListView {
id: page5List
anchors.fill: parent
model: Page5ListModel {}
delegate: contactDelegate
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
focus: true
}
Rectangle {
anchors.top: page5List.bottom
height: parent.height / 2
width: parent.width
color: "yellow"
ColumnLayout {
spacing: 2
Text {
Layout.preferredHeight: 40
anchors.centerIn: parent
text: activeFocus ? "I have active focus!" : "I do not have active focus"
}
Text {
Layout.alignment: Qt.AlignBottom
anchors.centerIn: parent
text: parent.height
}
}
}
}
// Rectangle { color: "green"; width: 20; height: 50 }
// Rectangle { color: "blue"; width: 50; height: 20 }
}
//ListView {
// width: 180; height: 200
// model: Page5ListModel{}
// delegate: Text {
// text: name + ": " + number
// }
//}
//Rectangle {
// width: 180;
// height: 200
//// height: parent.height / 3
// color: 'teal'
// Component {
// id: contactDelegate
// Item {
// width: 180; height: 40
// Column {
// Text { text: '<b>Name:</b> ' + name }
// Text { text: '<b>Number:</b> ' + number }
// }
// }
// }
// ListView {
// id: page5List
// anchors.fill: parent
// model: Page5ListModel {}
// delegate: contactDelegate
// highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
// focus: true
// }
// Text {
// anchors.top: page5List.bottom
// text: activeFocus ? "I have active focus!" : "I do not have active focus"
// }
//}
//ListView {
// width: 180; height: 200
// Component {
// id: contactsDelegate
// Rectangle {
// id: wrapper
// width: 180
// height: contactInfo.height
// color: ListView.isCurrentItem ? "black" : "red"
// Text {
// id: contactInfo
// text: name + ": " + number
// color: wrapper.ListView.isCurrentItem ? "red" : "black"
// }
// }
// }
// model: Page5ListModel {}
// delegate: contactsDelegate
// focus: true
//}