diff options
-rw-r--r-- | vcl/inc/qt5/Qt5Menu.hxx | 1 | ||||
-rw-r--r-- | vcl/qt5/Qt5Menu.cxx | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx index adac6f6ccdad..b8a451657372 100644 --- a/vcl/inc/qt5/Qt5Menu.hxx +++ b/vcl/inc/qt5/Qt5Menu.hxx @@ -54,6 +54,7 @@ public: virtual void SetSubMenu(SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos) override; virtual void SetFrame(const SalFrame* pFrame) override; const Qt5Frame* GetFrame() const; + virtual void ShowMenuBar(bool bVisible) override; Qt5Menu* GetTopLevel(); virtual void SetItemBits(unsigned nPos, MenuItemBits nBits) override; virtual void CheckItem(unsigned nPos, bool bCheck) override; diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index 4fdebe00f226..6112a7aa4e6c 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -544,6 +544,12 @@ Qt5Menu* Qt5Menu::GetTopLevel() return pMenu; } +void Qt5Menu::ShowMenuBar(bool bVisible) +{ + if (mpQMenuBar && (bVisible != mpQMenuBar->isVisible())) + bVisible ? mpQMenuBar->show() : mpQMenuBar->hide(); +} + const Qt5Frame* Qt5Menu::GetFrame() const { SolarMutexGuard aGuard; |