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>
This commit is contained in:
Volker Hilsheimer 2021-07-19 16:03:41 +02:00
parent 7502598ef5
commit 79a219862f

View File

@ -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