aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/auto/creation/quick.image/delegates_image.qml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/auto/creation/quick.image/delegates_image.qml')
-rw-r--r--benchmarks/auto/creation/quick.image/delegates_image.qml34
1 files changed, 34 insertions, 0 deletions
diff --git a/benchmarks/auto/creation/quick.image/delegates_image.qml b/benchmarks/auto/creation/quick.image/delegates_image.qml
new file mode 100644
index 0000000..d01ffe2
--- /dev/null
+++ b/benchmarks/auto/creation/quick.image/delegates_image.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.0
+
+Item {
+ id: root;
+ property int count: 50;
+ property int staticCount: 2500;
+
+ 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
+
+ property var names: [
+ "butterfly-wide.png",
+ "butterfly-half.png",
+ "butterfly-collapsed.png"
+ ];
+
+ Repeater {
+ id: repeater
+ Image {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ source: "../../../../shared/" + root.names[index % 3];
+ width: 20
+ height: 20
+
+ }
+ }
+}