diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.mm b/src/plugins/platforms/cocoa/qcocoamenubar.mm index 5a8664747e..7335deb800 100644 --- a/src/plugins/platforms/cocoa/qcocoamenubar.mm +++ b/src/plugins/platforms/cocoa/qcocoamenubar.mm @@ -79,6 +79,10 @@ QCocoaMenuBar::~QCocoaMenuBar() if (m_window && m_window->menubar() == this) { m_window->setMenubar(0); + // Delete the children first so they do not cause + // the native menu items to be hidden after + // the menu bar was updated + qDeleteAll(children()); updateMenuBarImmediately(); } }