aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks/auto/creation/quick.controls2/delegates_menu_custom.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/auto/creation/quick.controls2/delegates_menu_custom.qml')
-rw-r--r--src/benchmarks/auto/creation/quick.controls2/delegates_menu_custom.qml47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/benchmarks/auto/creation/quick.controls2/delegates_menu_custom.qml b/src/benchmarks/auto/creation/quick.controls2/delegates_menu_custom.qml
new file mode 100644
index 0000000..71a5b98
--- /dev/null
+++ b/src/benchmarks/auto/creation/quick.controls2/delegates_menu_custom.qml
@@ -0,0 +1,47 @@
+import QmlBench 1.0
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+
+CreationBenchmark {
+ id: root
+ count: 2
+ staticCount: 25
+
+ Component {
+ id: menuItemComponent
+
+ MenuItem {
+ contentItem: Text {
+ text: parent.text
+ color: "navajowhite"
+ }
+ background: Rectangle {
+ color: "steelblue"
+ }
+ }
+ }
+
+ delegate: Item {
+ Menu {
+ id: menu
+ title: "Root Menu"
+ delegate: menuItemComponent
+ visible: true
+
+ Menu {
+ title: "Sub-menu 1"
+ delegate: menuItemComponent
+
+ Menu {
+ title: "Sub-sub-menu"
+ delegate: menuItemComponent
+ }
+ }
+
+ Menu { title: "Sub-menu 2" }
+ Action { text: "Action 3" }
+ Action { text: "Action 4" }
+ Action { text: "Action 5" }
+ }
+ }
+}