blob: 99151aa9e1e84b89c387850dc8a3228b48e7afb5 (
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; property string modelName: model.name; function getText() { return name } }
Text { objectName: "section"; text: parent.ListView.section }
}
}
section.property: "name"
section.criteria: ViewSection.FullString
}
|