diff options
Diffstat (limited to 'benchmark/creation/delegates_buttoncontrol2.qml')
-rw-r--r-- | benchmark/creation/delegates_buttoncontrol2.qml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/benchmark/creation/delegates_buttoncontrol2.qml b/benchmark/creation/delegates_buttoncontrol2.qml new file mode 100644 index 0000000..660795e --- /dev/null +++ b/benchmark/creation/delegates_buttoncontrol2.qml @@ -0,0 +1,25 @@ +import QtQuick 2.0 +import QtQuick.Controls 2.0 + +Item { + id: root; + property int count: 20; + + 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; + } + } +} |