summaryrefslogtreecommitdiffstats
path: root/examples/declarative/parallax/ParallaxView.qml
blob: 38bb8c0ffa4ec04ef11398cc72bc67292231d573 (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
import Qt 4.6

Item {
    property alias background: background.source

    Image {
        id: background
        fillMode: Image.TileHorizontally
        x: -list.viewportX / 2
        width: Math.max(list.viewportWidth, parent.width)
    }

    default property alias content: visualModel.children
    ListView {
        id: list
        orientation: "Horizontal"
        overShoot: false
        anchors.fill: parent
        model: VisualItemModel { id: visualModel }

        highlight: Item { height: 1; width: 1}
        preferredHighlightBegin: 0
        preferredHighlightEnd: 0
        highlightRangeMode: "StrictlyEnforceRange"
    }
}