summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-30 23:39:53 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-30 23:39:53 (GMT)
commit0ce2bedf9b5da9d480b994a9b812c37d1f5caa39 (patch)
tree7e8ef6069f8c669ff6e92e23cf8b46cfad7ed3ee /examples
parenta70f8a2b0966420e1911554a117e066592b1822c (diff)
downloadQt-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')
-rw-r--r--examples/declarative/flowview/flowview.qml2
-rw-r--r--examples/declarative/loader/loader.qml6
-rw-r--r--examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml8
-rw-r--r--examples/declarative/tutorials/contacts/2_Reuse/1a/ContactField.qml8
-rw-r--r--examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml8
-rw-r--r--examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml12
-rw-r--r--examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml8
7 files changed, 27 insertions, 25 deletions
diff --git a/examples/declarative/flowview/flowview.qml b/examples/declarative/flowview/flowview.qml
index 77b3230..ff15d96 100644
--- a/examples/declarative/flowview/flowview.qml
+++ b/examples/declarative/flowview/flowview.qml
@@ -45,7 +45,7 @@ Rect {
delegate: Package {
Item { id: List; Package.name: "list"; width:120; height: 400; }
Item { id: Grid; Package.name: "grid"; width:400; height: 120; }
- Item { id: MyContent; width:400; height: 120; qml: weblet }
+ Loader { id: MyContent; width:400; height: 120; source: weblet }
StateGroup {
states: [
diff --git a/examples/declarative/loader/loader.qml b/examples/declarative/loader/loader.qml
index 447d73a..f507651 100644
--- a/examples/declarative/loader/loader.qml
+++ b/examples/declarative/loader/loader.qml
@@ -1,8 +1,10 @@
import Qt 4.6
Rect {
- id: Shell
width: 300
height: 400
- qml: "Browser.qml"
+ Loader {
+ anchors.fill: parent
+ source: "Browser.qml"
+ }
}
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 {