From ab0a2466d7e3998caad226197355b729f523764a Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 25 Jan 2011 22:12:07 +0100 Subject: Cocoa: non-native toolbar shows in window when hidden The reason is that we explicitly needs to tell it to hide which we do in the init function. But since QToolBar overrides setVisible, this fails. This patch makes sure we call the super version of the function --- src/gui/widgets/qmenubar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index dda5aba..5bfac9a 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -1073,8 +1073,11 @@ void QMenuBar::paintEvent(QPaintEvent *e) void QMenuBar::setVisible(bool visible) { #if defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_WS_S60) - if (isNativeMenuBar()) + if (isNativeMenuBar()) { + if (!visible) + QWidget::setVisible(false); return; + } #endif QWidget::setVisible(visible); } -- cgit v0.12