blob: 39cc05e615ac573dd3141c8cd2f83d088525310d (
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
29
|
import QtQuick 2.2
import QmlBench 1.0
// Move images around using a global property binding, to be compared with a
// number of other similar ways to move them around.
Benchmark {
id: root;
count: 500
staticCount: 20000
property int frameCount
onTChanged: {
frameCount++
}
Repeater {
model: root.count
Image {
source: "qrc:///shared/butterfly-wide.png"
x: QmlBench.getRandom() * (root.width - width)
y: QmlBench.getRandom() * (root.height - height)
width: 40
height: 40
rotation: index + frameCount
}
}
}
|