summaryrefslogtreecommitdiffstats
path: root/examples/declarative/modelviews/objectlistmodel/view.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/modelviews/objectlistmodel/view.qml')
-rw-r--r--examples/declarative/modelviews/objectlistmodel/view.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/declarative/modelviews/objectlistmodel/view.qml b/examples/declarative/modelviews/objectlistmodel/view.qml
new file mode 100644
index 0000000..2b8383f
--- /dev/null
+++ b/examples/declarative/modelviews/objectlistmodel/view.qml
@@ -0,0 +1,16 @@
+import Qt 4.7
+
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ color: model.modelData.color
+ Text { text: name }
+ }
+ }
+}