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 /examples/declarative/tutorials | |
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 'examples/declarative/tutorials')
5 files changed, 22 insertions, 22 deletions
diff --git a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml index 42feeb1..29e00d9 100644 --- a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml +++ b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml @@ -17,15 +17,15 @@ FocusRealm { height: groupBox.height-20 color: "white" pen.color: "black" - Item { + Loader { id: subItem - qml: groupBox.contents + source: groupBox.contents anchors.top: parent.top anchors.topMargin: 10 anchors.right: parent.right anchors.rightMargin: 10 - width: qmlItem.width - height: qmlItem.height + width: item.width + height: item.height } } Rect { diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1a/ContactField.qml b/examples/declarative/tutorials/contacts/2_Reuse/1a/ContactField.qml index e3081b9..cf50fb0 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/1a/ContactField.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/1a/ContactField.qml @@ -6,11 +6,11 @@ Item { clip: true width: 230 height: 30 - Item { + Loader { id: removeButton - qml: "RemoveButton.qml" - width: qmlItem.width - height: qmlItem.height + source: "RemoveButton.qml" + width: item.width + height: item.height anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom diff --git a/examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml b/examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml index 42feeb1..29e00d9 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml @@ -17,15 +17,15 @@ FocusRealm { height: groupBox.height-20 color: "white" pen.color: "black" - Item { + Loader { id: subItem - qml: groupBox.contents + source: groupBox.contents anchors.top: parent.top anchors.topMargin: 10 anchors.right: parent.right anchors.rightMargin: 10 - width: qmlItem.width - height: qmlItem.height + width: item.width + height: item.height } } Rect { diff --git a/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml b/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml index 46e09a0..cc115e3 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml @@ -56,33 +56,33 @@ Item { MouseRegion { anchors.fill: label onClicked: { - Details.qml = 'Contact.qml'; + Details.source = 'Contact.qml'; wrapper.state='opened'; } } - Item { + Loader { id: Details anchors.fill: parent opacity: 0 //! [setting qml] //! [binding] 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 } diff --git a/examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml b/examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml index 42feeb1..29e00d9 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml @@ -17,15 +17,15 @@ FocusRealm { height: groupBox.height-20 color: "white" pen.color: "black" - Item { + Loader { id: subItem - qml: groupBox.contents + source: groupBox.contents anchors.top: parent.top anchors.topMargin: 10 anchors.right: parent.right anchors.rightMargin: 10 - width: qmlItem.width - height: qmlItem.height + width: item.width + height: item.height } } Rect { |