summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Menu.cxx
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2018-08-09 17:14:14 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-08-12 22:25:54 +0200
commit8d791a9d9657f6573ce27947c0289b36c6eba77c (patch)
tree0a5a788620f7c7ec4404a45f81e8f3b8c5722db2 /vcl/qt5/Qt5Menu.cxx
parent20444972edb1dd49af13902a850a8e343d5a60ec (diff)
Set Qt5Widget to be a central widget of QMainWindow
this is meant to solve the problem of native menu bar overlapping w/ non-native, as well as the inability to place an object or select text dragging the mouse cursor w/ LMB pressed Change-Id: I29f590ebf79d1ecc7e17b402125384cf13774bf3 Reviewed-on: https://gerrit.libreoffice.org/58171 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/qt5/Qt5Menu.cxx')
-rw-r--r--vcl/qt5/Qt5Menu.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx
index b594b8ad44c3..859f365aa3ea 100644
--- a/vcl/qt5/Qt5Menu.cxx
+++ b/vcl/qt5/Qt5Menu.cxx
@@ -8,6 +8,7 @@
*/
#include <Qt5Frame.hxx>
+#include <Qt5MainWindow.hxx>
#include <Qt5Menu.hxx>
#include <Qt5Menu.moc>
@@ -68,8 +69,7 @@ void Qt5Menu::SetFrame(const SalFrame* pFrame)
mpFrame->SetMenu(this);
- QWidget* pWidget = mpFrame->GetQWidget();
- QMainWindow* pMainWindow = dynamic_cast<QMainWindow*>(pWidget);
+ Qt5MainWindow* pMainWindow = mpFrame->GetTopLevelWindow();
if (pMainWindow)
mpQMenuBar = pMainWindow->menuBar();