aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview2/data/sectionBoundComponent.qml
blob: 74ab6b59fa46b05eab8b6d49162140260bb54655 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pragma ComponentBehavior: Bound
import QtQuick
ListView {
   id: view
   width: 100
   height: 100
   model: ListModel {
        ListElement { name: "foo"; age: 42  }
        ListElement { name: "bar"; age: 13  }
    }
    delegate: Text { required property string name; text: name}
    section.property: "age"
    section.delegate: Rectangle { color: "gray"; width: view.width; height: 20; required property string section; Text {text: parent.section} }
}