summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-07-19 16:03:41 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-08-10 12:00:13 +0200
commit79a219862f45a11c948bab574afa961a73b72b73 (patch)
treef53eed1707b10c3579bed3b7ea9808c3d6330ab7 /src/widgets/widgets/qmenu.cpp
parent7502598ef5bfa3f1a6d4f435bc2b91914e3acc61 (diff)
Document that hiding/disabling a menu is best done via the menuAction
Task-number: QTBUG-95072 Pick-to: 6.2 Change-Id: I83afe13b129a35b39c62abe553061cc4a390fd65 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
-rw-r--r--src/widgets/widgets/qmenu.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 9612e11c01..c418f6dc7d 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1678,7 +1678,9 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
QWidgetAction fires the triggered() signal, the menu will close.
\warning To make QMenu visible on the screen, exec() or popup() should be
- used instead of show().
+ used instead of show() or setVisible(). To hide or disable the menu in the
+ menubar, or in another menu to which it was added as a submenu, use the
+ respective properties of menuAction() instead.
\section1 QMenu on \macos with Qt Build Against Cocoa