blob: 80e13d6824654746eafcbbd24a9a5123a84932f6 (
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
|
import QtQuick 2.0
import QmlBench 1.0
// Test the creation of an asynchronously loaded image.
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
asynchronous: true
}
}
|