aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-03-30 13:24:20 +0200
committerRobin Burchell <robin.burchell@crimson.no>2017-03-30 14:32:31 +0000
commitad736e2707026207ec4839f9141d407a820c01fe (patch)
treea871eaa3bd1979594adae2e75e1d9e8b1ebabe81 /benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml
parent7c3859a49ab5776d6df97858cef5b86688f8e1ce (diff)
creation: Port remaining benchmarks to use benchmark helpers
Change-Id: I24ba380295eeb576d61ae28cc9db914b4522f39d Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml')
-rw-r--r--benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml28
1 files changed, 8 insertions, 20 deletions
diff --git a/benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml b/benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml
index 68626f2..cf32484 100644
--- a/benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml
+++ b/benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml
@@ -1,26 +1,14 @@
import QtQuick 2.0
+import QmlBench 1.0
import QtQuick.Controls 2.0
-Item {
+CreationBenchmark {
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
- Button {
- x: Math.random() * root.width - width
- y: Math.random() * root.height - height
- text: "Item #" + index;
- }
+ count: 20;
+ staticCount: 1000;
+ delegate: Button {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ text: "Item #" + index;
}
}