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

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

    anchors.fill: parent
    preferredHighlightBegin: 0.5
    preferredHighlightEnd: 0.5
    pathItemCount: 10
    interactive: true
    model: 15
    // Much bigger cache than model - pathItemCount
    cacheItemCount: 100
    delegate: Text {
        text: modelData
        Component.onCompleted: view.delegatesCreated++;
        Component.onDestruction: view.delegatesDestroyed++;
    }
    path: Path {
        PathLine {
            x: 0
            y: 400
        }
    }
}