blob: 467d60dff85485fc064b310307cedc832f733c54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
import QtQml
DelegateModel {
id: root
property ListModel singularModel: ListModel {
ListElement {
a: "a"
}
ListElement {
a: "a"
}
}
property ListModel listModel: ListModel {
ListElement {
a: "a"
b: "b"
}
ListElement {
a: "a"
b: "b"
}
}
property var array: [
{a: "a", b: "b"}, {a: "b", b: "b"}
]
property QtObject object: QtObject {
property string a: "a"
property string b: "b"
}
property int n: -1
model: {
switch (n) {
case 0: return singularModel
case 1: return listModel
case 2: return array
case 3: return object
}
return undefined;
}
delegate: QtObject {
required property string a
}
}
|