From ae2a9dbb787e682e0f8db1b34075dcf10dff6125 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 11 May 2017 09:29:40 +0200 Subject: [PATCH] Work around issue with vanishing menu bar with Unity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When Widget Designer is opened with a QMainWindow based form, the "native" Unity menu bar vanishes. This is a workaround by disabling the native menu bar integration on Linux. Task-number: QTCREATORBUG-17519 Change-Id: I93eb3a590200fb8fff90017d8d6eddda8edaa42e Reviewed-by: André Hartmann --- src/app/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index 97a509757b2..77cf8cb42e9 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -280,6 +280,9 @@ void loadFonts() int main(int argc, char **argv) { + if (Utils::HostOsInfo::isLinuxHost()) + QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar); + Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/QtCreator-XXXXXX"); const char *highDpiEnvironmentVariable = setHighDpiEnvironmentVariable();