summaryrefslogtreecommitdiff
path: root/src/controls/qquickmenuitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/qquickmenuitem.cpp')
-rw-r--r--src/controls/qquickmenuitem.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/controls/qquickmenuitem.cpp b/src/controls/qquickmenuitem.cpp
index 0167bebd..ef048e82 100644
--- a/src/controls/qquickmenuitem.cpp
+++ b/src/controls/qquickmenuitem.cpp
@@ -142,6 +142,38 @@ void QQuickMenuBase::setVisualItem(QQuickItem *item)
\ingroup menus
\brief MenuSeparator provides a separator for items inside a menu.
+ \image menu.png
+
+ \code
+ Menu {
+ text: "Edit"
+
+ MenuItem {
+ text: "Cut"
+ shortcut: "Ctrl+X"
+ onTriggered: ...
+ }
+
+ MenuItem {
+ text: "Copy"
+ shortcut: "Ctrl+C"
+ onTriggered: ...
+ }
+
+ MenuItem {
+ text: "Paste"
+ shortcut: "Ctrl+V"
+ onTriggered: ...
+ }
+ MenuSeparator { }
+ MenuItem {
+ text: "Do Nothing"
+ shortcut: "Ctrl+E,Shift+Ctrl+X"
+ enabled: false
+ }
+ }
+ \endcode
+
\sa Menu, MenuItem
*/
@@ -259,6 +291,8 @@ void QQuickMenuText::updateIcon()
\inqmlmodule QtQuick.Controls
\brief MenuItem provides an item to add in a menu or a menu bar.
+ \image menu.png
+
\code
Menu {
text: "Edit"