Mercurial > hg > tony
comparison src/MainWindow.cpp @ 385:93d63e69b181
Workaround for disappearing menubar under Ubuntu
author | Chris Cannam |
---|---|
date | Mon, 01 Sep 2014 16:12:15 +0100 |
parents | d7d828d2b2a5 |
children | 0649ac148bf7 |
comparison
equal
deleted
inserted
replaced
384:d7d828d2b2a5 | 385:93d63e69b181 |
---|---|
423 | 423 |
424 void | 424 void |
425 MainWindow::setupMenus() | 425 MainWindow::setupMenus() |
426 { | 426 { |
427 if (!m_mainMenusCreated) { | 427 if (!m_mainMenusCreated) { |
428 | |
429 #ifdef Q_OS_LINUX | |
430 // In Ubuntu 14.04 the window's menu bar goes missing entirely | |
431 // if the user is running any desktop environment other than Unity | |
432 // (in which the faux single-menubar appears). The user has a | |
433 // workaround, to remove the appmenu-qt5 package, but that is | |
434 // awkward and the problem is so severe that it merits disabling | |
435 // the system menubar integration altogether. Like this: | |
436 menuBar()->setNativeMenuBar(false); | |
437 #endif | |
438 | |
428 m_rightButtonMenu = new QMenu(); | 439 m_rightButtonMenu = new QMenu(); |
429 } | 440 } |
430 | 441 |
431 if (!m_mainMenusCreated) { | 442 if (!m_mainMenusCreated) { |
432 CommandHistory::getInstance()->registerMenu(m_rightButtonMenu); | 443 CommandHistory::getInstance()->registerMenu(m_rightButtonMenu); |