diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qmenubar.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index 82b3769..0967f71 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -1695,6 +1695,7 @@ QSize QMenuBar::sizeHint() const ensurePolished(); QSize ret(0, 0); + const_cast<QMenuBarPrivate*>(d)->updateGeometries(); const int hmargin = style()->pixelMetric(QStyle::PM_MenuBarHMargin, 0, this); const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, this); int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, this); @@ -1750,6 +1751,7 @@ int QMenuBar::heightForWidth(int) const const bool as_gui_menubar = true; #endif + const_cast<QMenuBarPrivate*>(d)->updateGeometries(); int height = 0; const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, this); int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, this); |