-
Notifications
You must be signed in to change notification settings - Fork 1
/
FormsDemo.qml
142 lines (111 loc) · 3.46 KB
/
FormsDemo.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
import QtQuick 2.4
import QtQuick.Layouts 1.1
import Material 0.2
import Material.ListItems 0.1 as ListItem
import Material.Extras 0.1
Item {
View {
anchors.centerIn: parent
width: dp(350)
height: column.implicitHeight + dp(32)
elevation: 1
radius: dp(2)
ColumnLayout {
id: column
anchors {
fill: parent
topMargin: dp(16)
bottomMargin: dp(16)
}
Label {
id: titleLabel
anchors {
left: parent.left
right: parent.right
margins: dp(16)
}
style: "title"
text: "Edit shipping info"
}
Item {
Layout.fillWidth: true
Layout.preferredHeight: dp(8)
}
ListItem.Standard {
action: Icon {
anchors.centerIn: parent
name: "action/account_circle"
}
content: TextField {
anchors.centerIn: parent
width: parent.width
text: "Alex Nelson"
}
}
ListItem.Standard {
action: Icon {
anchors.centerIn: parent
name: "maps/place"
}
content: TextField {
anchors.centerIn: parent
width: parent.width
text: "100 Main Street"
}
}
ListItem.Standard {
action: Item {}
content: RowLayout {
anchors.centerIn: parent
width: parent.width
TextField {
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: 0.4 * parent.width
text: "New York"
}
MenuField {
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: 0.2 * parent.width
model: ["NY", "NC", "ND"]
}
TextField {
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: 0.3 * parent.width
text: "10011"
}
}
}
ListItem.Standard {
action: Icon {
anchors.centerIn: parent
name: "communication/email"
}
content: TextField {
anchors.centerIn: parent
width: parent.width
placeholderText: "Email"
}
}
Item {
Layout.fillWidth: true
Layout.preferredHeight: dp(8)
}
RowLayout {
Layout.alignment: Qt.AlignRight
spacing: dp(8)
anchors {
right: parent.right
margins: dp(16)
}
Button {
text: "Cancel"
textColor: Theme.primaryColor
}
Button {
text: "Done"
textColor: Theme.primaryColor
}
}
}
}
}