aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/auto/creation/quick/delegates_qobject.qml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/auto/creation/quick/delegates_qobject.qml')
-rw-r--r--benchmarks/auto/creation/quick/delegates_qobject.qml27
1 files changed, 27 insertions, 0 deletions
diff --git a/benchmarks/auto/creation/quick/delegates_qobject.qml b/benchmarks/auto/creation/quick/delegates_qobject.qml
new file mode 100644
index 0000000..b7ee533
--- /dev/null
+++ b/benchmarks/auto/creation/quick/delegates_qobject.qml
@@ -0,0 +1,27 @@
+import QtQuick 2.0
+
+Item {
+ id: root;
+ property int count: 50;
+ property int staticCount: 10000;
+
+ property real t;
+ NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
+ onTChanged: {
+ allocate();
+ }
+
+ Component {
+ id: component;
+ QtObject {
+
+ }
+ }
+
+ function allocate() {
+ for (var i=0; i<root.count; ++i) {
+ var object = component.createObject();
+ object.destroy();
+ }
+ }
+}