aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qquickvisualdatamodel/data/objectlist.qml
blob: b3952a8a4d9f58a2c71738c53b778b1cc99e8abe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import QtQuick 2.0

ListView {
    width: 100
    height: 100
    anchors.fill: parent
    model: myModel
    delegate: Component {
        Rectangle {
            height: 25
            width: 100
            color: model.modelData.color
            Text { objectName: "name"; text: name; function getText() { return name } }
            Text { objectName: "section"; text: parent.ListView.section }
        }
    }
    section.property: "name"
    section.criteria: ViewSection.FullString
}