summaryrefslogtreecommitdiffstats
path: root/examples/declarative/objectlistmodel/view.qml
blob: 2b8383fadeb4f0a59c87f99787b6d3a47d32c3cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 }
        }
    }
}