blob: 67f896b76ce09efe018d91be0bed5fc8c92c06da (
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
|
import Qt 4.7
Item {
width: 400
height: 200
ListModel {
id: myModel
ListElement { display: "One" }
ListElement { display: "Two" }
ListElement { display: "Three" }
ListElement { display: "Four" }
ListElement { display: "Five" }
ListElement { display: "Six" }
ListElement { display: "Seven" }
ListElement { display: "Eight" }
}
//![0]
VisualDataModel {
id: visualModel
delegate: Delegate {}
model: myModel
}
ListView {
width: 200; height:200
model: visualModel.parts.list
}
GridView {
x: 200; width: 200; height:200
cellHeight: 50
model: visualModel.parts.grid
}
//![0]
}
|