aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview2/data/bindOnHeaderAndFooterXPosition.qml
blob: 69431fb5250594c14b0e08f4ac680cda0e93c6ce (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: 200
    height: 300
    spacing: 20
    orientation: ListView.Vertical

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

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

    model: 3
    delegate: Text {
        text: 'Foobar'
        horizontalAlignment: Text.AlignHCenter
        width: ListView.view.width
    }
}