import QtQuick 2.0 Rectangle { width: 800 height: 600 ListModel { id: listModel ListElement { section: "section 1" } ListElement { section: "section 1" } ListElement { section: "section 1" } ListElement { section: "section 2" } ListElement { section: "section 2" } ListElement { section: "section 2" } ListElement { section: "section 3" } ListElement { section: "section 3" } ListElement { section: "section 3" } ListElement { section: "section 4" } ListElement { section: "section 4" } ListElement { section: "section 4" } ListElement { section: "section 6" } ListElement { section: "section 6" } ListElement { section: "section 6" } ListElement { section: "section 7" } ListElement { section: "section 7" } ListElement { section: "section 7" } ListElement { section: "section 8" } ListElement { section: "section 8" } ListElement { section: "section 8" } ListElement { section: "section 9" } ListElement { section: "section 9" } ListElement { section: "section 9" } } ListView { anchors.fill: parent model: listModel section.property: "section" section.labelPositioning: ViewSection.InlineLabels | ViewSection.CurrentLabelAtStart section.delegate: Rectangle { width: 800 height: 30 color: "darkblue" border.color: "white" border.width: 1 Text { anchors.fill: parent verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter text: section color: "white" } } snapMode: ListView.SnapToItem spacing: 10 delegate: Rectangle { width: 700 height: 80 color: "whitesmoke" border.color: "black" border.width: 1 Text { anchors.fill: parent text: "the quick brown fox jumps over the lazy dog" color: "black" } } } }