aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview2/data/bindOnHeaderAndFooterYPosition.qml
blob: a484a154a7edecf1be0418327033b865ec572e46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import QtQuick

ListView {
    width: 300
    height: 200
    spacing: 20
    orientation: ListView.Horizontal

    header: Rectangle {
        y: (ListView.view.height - height) / 2
        color: 'tomato'
        width: 50
        height: 50
    }

    footer: Rectangle {
        y: (ListView.view.height - height) / 2
        color: 'lime'
        width: 50
        height: 50
    }

    model: 3
    delegate: Text {
        text: 'Foobar'
        verticalAlignment: Text.AlignVCenter
        height: ListView.view.height
    }
}