summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorJyri Tahtela <jyri.tahtela@nokia.com>2011-05-16 15:36:03 +0300
committerJyri Tahtela <jyri.tahtela@nokia.com>2011-05-16 15:36:03 +0300
commit82639818e567922e0255af039b9c397d13e4d9b7 (patch)
tree6a6746acc321e21f546023a740b53b59297d64eb /tools/designer
parent1eea52e5b18ef2167d375285e3838bd7883cfd7d (diff)
parent7e4a9187bb11b794e45d95d2e9fae026d6b0d07d (diff)
Merge remote-tracking branch 'qt/4.8'
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/designer/qdesigner_workbench.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/designer/src/designer/qdesigner_workbench.cpp b/tools/designer/src/designer/qdesigner_workbench.cpp
index 72b32b74b5..090629f84d 100644
--- a/tools/designer/src/designer/qdesigner_workbench.cpp
+++ b/tools/designer/src/designer/qdesigner_workbench.cpp
@@ -410,6 +410,9 @@ void QDesignerWorkbench::switchToDockedMode()
switchToNeutralMode();
+#ifdef Q_WS_X11
+ QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, false);
+#endif
#ifndef Q_WS_MAC
QDesignerToolWindow *widgetBoxWrapper = widgetBoxToolWindow();
widgetBoxWrapper->action()->setVisible(true);
@@ -477,6 +480,14 @@ void QDesignerWorkbench::switchToTopLevelMode()
// The widget box is special, it gets the menubar and gets to be the main widget.
m_core->setTopLevel(widgetBoxWrapper);
+#ifdef Q_WS_X11
+ // For now the appmenu protocol does not make it possible to associate a
+ // menubar with all application windows. This means in top level mode you
+ // can only reach the menubar when the widgetbox window is active. Since
+ // this is quite inconvenient, better not use the native menubar in this
+ // configuration and keep the menubar in the widgetbox window.
+ QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
+#endif
#ifndef Q_WS_MAC
widgetBoxWrapper->setMenuBar(m_globalMenuBar);
widgetBoxWrapper->action()->setVisible(false);