aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpathview/data/qtbug46487.qml
blob: 840d77ffe47c9264c590ccbedc51727bca35dbfa (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
import QtQuick 2.0

PathView {
    id: view
    property int delegatesCreated: 0
    property int delegatesDestroyed: 0

    width: 400
    height: 400
    preferredHighlightBegin: 0.5
    preferredHighlightEnd: 0.5
    pathItemCount: 5
    currentIndex: 1
    model: customModel
    delegate: Text {
        text: "item: " + index + " of: " + view.count
        Component.onCompleted: view.delegatesCreated++;
        Component.onDestruction: view.delegatesDestroyed++;
    }
    path: Path {
        startX: 50
        startY: 0
        PathLine {
            x: 50
            y: 400
        }
    }
}