aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpathview/data/qtbug53464.qml
blob: a2855c0fb5a92e7466ac9319ae15d97e329190b9 (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
30
31
32
33
34
35
36
37
38
39
40
// Copyright (C) 2016 Netris
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick 2.0

Rectangle {
    width: 600
    height: 400
    PathView {
        objectName: "pathView"
        model: 10
        anchors.fill: parent
        pathItemCount: 5
        highlightRangeMode: PathView.StrictlyEnforceRange
        preferredHighlightBegin: 0.5
        preferredHighlightEnd: 0.5
        currentIndex: 8

        path: Path {
            startX: 0
            startY: 50
            PathLine {
                x: 600
                y: 50
            }
        }

        delegate: Component {
            Text {
                width: 50
                height: 50
                text: index
                objectName: "delegate" + index
                font.pixelSize: 24
                color: PathView.isCurrentItem ? "green" : "black"
            }
        }
    }
}