-
Notifications
You must be signed in to change notification settings - Fork 1
/
ListItemsDemo.qml
62 lines (50 loc) · 1.63 KB
/
ListItemsDemo.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
import QtQuick 2.4
import Material 0.2
import Material.ListItems 0.1 as ListItem
import Material.Extras 0.1
Item {
View {
anchors {
fill: parent
margins: dp(32)
}
elevation: 1
Column {
anchors.fill: parent
ListItem.Subheader {
text: "Section Subheader"
}
ListItem.Standard {
text: "Standard list item"
}
ListItem.Subtitled {
text: "Subtitled list item"
subText: "With some subtext!"
}
ListItem.Subtitled {
text: "Subtitled list item"
subText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec eleifend arcu, eu convallis nisi."
valueText: "2h ago"
maximumLineCount: 3
}
ListItem.Subtitled {
text: "Subtitled list item"
subText: "With some subtext, icon, and secondary item!"
secondaryItem: Switch {
id: enablingSwitch
anchors.verticalCenter: parent.verticalCenter
}
onClicked: enablingSwitch.checked = !enablingSwitch.checked
action: Icon {
anchors.centerIn: parent
name: "device/access_alarm"
size: dp(32)
}
}
ListItem.SimpleMenu {
text: "Subtitled list item"
model: ["A", "B and some long text that should not clip", "C"]
}
}
}
}