diff options
| author | Mitch Curtis <mitch.curtis@qt.io> | 2024-04-25 14:37:55 +0800 |
|---|---|---|
| committer | Mitch Curtis <mitch.curtis@qt.io> | 2024-05-06 10:49:48 +0800 |
| commit | d9816345208d4ac3965a90b1572115e7df1b9d72 (patch) | |
| tree | 2cbe7d5ec791e0fe91826f51e70a9af22142167c /tests/manual/quickcontrols/menus/Main.qml | |
| parent | 257b09138d6c4f93fdc1e81f5a75af87e7a66718 (diff) | |
Add support for icons to native menus
Task-number: QTBUG-69558
Change-Id: I9486f474dd386061636c326b508c20848ebab807
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/manual/quickcontrols/menus/Main.qml')
| -rw-r--r-- | tests/manual/quickcontrols/menus/Main.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/manual/quickcontrols/menus/Main.qml b/tests/manual/quickcontrols/menus/Main.qml index 34b60fdfd3..4a55da58fe 100644 --- a/tests/manual/quickcontrols/menus/Main.qml +++ b/tests/manual/quickcontrols/menus/Main.qml @@ -300,6 +300,24 @@ ApplicationWindow { MenuSeparator {} + ContextAction { + text: qsTr("Context menu item with icon (name)") + icon.name: "mail-send" + } + + ContextAction { + text: qsTr("Context menu item with icon (source)") + icon.source: "qrc:/qt/qml/Menus/icons/warning.png" + } + + ContextAction { + text: qsTr("Context menu item with disabled icon (source)") + icon.source: "qrc:/qt/qml/Menus/icons/warning.png" + enabled: false + } + + MenuSeparator {} + Menu { id: subMenu title: qsTr("Sub-menu") |
