aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview2/data/innerRequired.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquicklistview2/data/innerRequired.qml')
-rw-r--r--tests/auto/quick/qquicklistview2/data/innerRequired.qml35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview2/data/innerRequired.qml b/tests/auto/quick/qquicklistview2/data/innerRequired.qml
new file mode 100644
index 0000000000..c0862cec0d
--- /dev/null
+++ b/tests/auto/quick/qquicklistview2/data/innerRequired.qml
@@ -0,0 +1,35 @@
+import QtQuick
+
+Item {
+ ListModel {
+ id: myModel
+ ListElement { type: "Dog"; age: 8; noise: "meow" }
+ ListElement { type: "Cat"; age: 5; noise: "woof" }
+ }
+
+ component SomeDelegate: Item {
+ required property int age
+ property string text
+ }
+
+ component AnotherDelegate: Item {
+ property int age
+ property string text
+
+ SomeDelegate {
+ age: 0
+ text: ""
+ }
+ }
+
+ ListView {
+ id: listView
+ model: myModel
+ width: 100
+ height: 100
+ delegate: AnotherDelegate {
+ age: model.age
+ text: model.noise
+ }
+ }
+}