blob: b0d5bd8032329a8772914485ca673bc74971ec6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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 }
}
}
function changeSectionProperty() {
section.property = "object.subName"
}
section.property: "name"
section.criteria: ViewSection.FullString
}
|