aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks/auto/creation/quick.image/delegates_image.qml
blob: 93432ed6c151432474d162dd8ab4c5b4c25cba28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import QtQuick 2.0
import QmlBench 1.0

// Test the creation of an Image with fairly stock settings (synchronous, no AA)
CreationBenchmark {
    id: root;
    count: 50;
    staticCount: 2500;

    property var names: [
        "butterfly-wide.png",
        "butterfly-half.png",
        "butterfly-collapsed.png"
    ];

    delegate: Image {
        x: QmlBench.getRandom() * (root.width - width)
        y: QmlBench.getRandom() * (root.height - height)
        source: "qrc:///shared/" + root.names[index % 3];
        width: 20
        height: 20
    }
}