blob: 07bba0c4d850dda79aedeac984d8e597f2cdf7fa (
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.6
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]
}
|