diff options
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
-rw-r--r-- | src/widgets/widgets/qmenu.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 4a6c51383d..85dbe9b6e0 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2373,6 +2373,8 @@ void QMenuPrivate::popup(const QPoint &p, QAction *atAction, PositionFunction po doChildEffects = true; updateLayoutDirection(); + q->ensurePolished(); // Get the right font + // Ensure that we get correct sizeHints by placing this window on the correct screen. // However if the QMenu was constructed with a Qt::Desktop widget as its parent, // then initialScreenIndex was set, so we should respect that for the lifetime of this menu. @@ -2407,7 +2409,6 @@ void QMenuPrivate::popup(const QPoint &p, QAction *atAction, PositionFunction po q->setAttribute(Qt::WA_X11NetWmWindowTypeDropDownMenu, qobject_cast<QMenuBar *>(topCausedWidget()) != nullptr); #endif - q->ensurePolished(); // Get the right font emit q->aboutToShow(); const bool actionListChanged = itemsDirty; |