diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-07-19 16:03:41 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-10 10:00:29 +0000 |
commit | c4278a59d3b96f4f2e574a7d2c73eeab99d34f5d (patch) | |
tree | 9bbadc6c377f1e4859ef9bc799953393c1c729ba | |
parent | 07fb176b103dc6c4dc963ddd4551fee7e8cb80b7 (diff) |
Document that hiding/disabling a menu is best done via the menuAction
Task-number: QTBUG-95072
Change-Id: I83afe13b129a35b39c62abe553061cc4a390fd65
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 79a219862f45a11c948bab574afa961a73b72b73)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/widgets/widgets/qmenu.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 282cbe420f..9d0d77b0d3 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 |