summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/contacts/2_Reuse/3/Contact.qml
blob: 23560ce22074a230146e153d4b951f7f29755c1a (plain)
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
Item {
    id: contactDetails
    width: 230
    height: layout.height

    properties: Property {
        name: "contactid"
        value: ""
    }
    properties: Property {
        name: "label"
        onValueChanged: { labelField.value = label }
    }
    properties: Property {
        name: "phone"
        onValueChanged: { phoneField.value = phone }
    }
    properties: Property {
        name: "email"
        onValueChanged: { emailField.value = email }
    }
    VerticalLayout {
        id: layout
        anchors.fill: parent
        spacing: 5
        margin: 5
        ContactField {
            id: labelField
            anchors.left: layout.left
            anchors.leftMargin: 5
            anchors.right: layout.right
            anchors.rightMargin: 5
            label: "Name"
        }
        ContactField {
            id: phoneField
            anchors.left: layout.left
            anchors.leftMargin: 5
            anchors.right: layout.right
            anchors.rightMargin: 5
            icon: "../../shared/pics/phone.png"
            label: "Phone"
        }
        ContactField {
            id: emailField
            anchors.left: layout.left
            anchors.leftMargin: 5
            anchors.right: layout.right
            anchors.rightMargin: 5
            icon: "../../shared/pics/email.png"
            label: "Email"
        }
    }
}