diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-07-30 23:39:53 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-07-30 23:39:53 (GMT) |
commit | 0ce2bedf9b5da9d480b994a9b812c37d1f5caa39 (patch) | |
tree | 7e8ef6069f8c669ff6e92e23cf8b46cfad7ed3ee /demos/declarative/contacts | |
parent | a70f8a2b0966420e1911554a117e066592b1822c (diff) | |
download | Qt-0ce2bedf9b5da9d480b994a9b812c37d1f5caa39.zip Qt-0ce2bedf9b5da9d480b994a9b812c37d1f5caa39.tar.gz Qt-0ce2bedf9b5da9d480b994a9b812c37d1f5caa39.tar.bz2 |
Introduce Loader item.
The Loader item takes the qml/qmlItem functionality from Item and
moves it to a specialized subclass.
Diffstat (limited to 'demos/declarative/contacts')
-rw-r--r-- | demos/declarative/contacts/contacts.qml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/demos/declarative/contacts/contacts.qml b/demos/declarative/contacts/contacts.qml index 189a5d7..6bd7b21 100644 --- a/demos/declarative/contacts/contacts.qml +++ b/demos/declarative/contacts/contacts.qml @@ -42,7 +42,7 @@ Rect { MouseRegion { anchors.fill: parent onClicked: { - Details.qml = 'Contact.qml'; + Details.source = 'Contact.qml'; wrapper.state ='opened'; contacts.mode = 'edit'; } @@ -67,27 +67,27 @@ Rect { } ] } - Item { + Loader { id: Details anchors.fill: wrapper opacity: 0 Bind { - target: Details.qmlItem + target: Details.item property: "contactId" value: model.recid } Bind { - target: Details.qmlItem + target: Details.item property: "label" value: model.label } Bind { - target: Details.qmlItem + target: Details.item property: "phone" value: model.phone } Bind { - target: Details.qmlItem + target: Details.item property: "email" value: model.email } @@ -130,7 +130,7 @@ Rect { signal: "clicked()" script: { if (wrapper.state == 'opened' && !contacts.mouseGrabbed) { - Details.qmlItem.update(); + Details.item.update(); wrapper.state = ''; contacts.mode = 'list'; contactList.exec(); @@ -154,7 +154,7 @@ Rect { signal: "confirmed()" script: { if (wrapper.state == 'opened' && !contacts.mouseGrabbed) { - Details.qmlItem.remove(); + Details.item.remove(); wrapper.state = ''; contacts.mode = 'list'; contactList.exec(); |