aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/auto/creation/controls/delegates_labelcontrol2.qml
blob: fbde27e3dfd5ceaefc3632f25c381efaa9f63013 (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 QtQuick 2.0
import QtQuick.Controls 2.0

Item {
    id: root;
    property int count: 20;
    property int staticCount: 1000;

    property real t;
    NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
    onTChanged: {
        repeater.model = 0;
        repeater.model = root.count
    }

    Component.onCompleted: repeater.model = root.count

    Repeater {
        id: repeater
        Label {
            x: Math.random() * root.width - width
            y: Math.random() * root.height - height
            text: "Qt Quick!"
        }
    }
}