aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml')
-rw-r--r--src/benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml b/src/benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml
new file mode 100644
index 0000000..eea7e34
--- /dev/null
+++ b/src/benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml
@@ -0,0 +1,24 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.2
+
+// Tests the creation of QQC2's ScrollView type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 250
+ delegate: ScrollView {
+ x: QmlBench.getRandom() * root.width - width
+ y: QmlBench.getRandom() * root.height - height
+ width: 100
+ height: 100
+ Item {
+ implicitWidth: 200
+ implicitHeight: 200
+ }
+ ScrollBar.vertical.active: true
+ ScrollBar.vertical.pressed: index % 3 === 1
+ ScrollBar.horizontal.active: true
+ ScrollBar.horizontal.pressed: index % 3 === 2
+ }
+}