From 0b728313dbca3ca6ea54bb8f533dbe70028f96e0 Mon Sep 17 00:00:00 2001 From: Karim Pinter Date: Fri, 26 Nov 2010 10:38:45 +0200 Subject: Adding warning to QMenu documentation If the QMenu is made visible using show() it causes problems because the scrolling and layout is not set properly. The warning suggests to use exec() or popup() instead. Task-number: QTBUG-12119 --- src/gui/widgets/qmenu.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 4bea6de..551e19e 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -1319,6 +1319,9 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action) Conversely, actions can be added to widgets with the addAction(), addActions() and insertAction() functions. + + \warning To make QMenu visible on the screen, exec() or popup() should be + used instead of show(). \section1 QMenu on Qt for Windows CE -- cgit v0.12