Add a menu item to mainwindow example to toggle unified toolbars.

Change-Id: Id7d7433849565b1acfc690cf5e23e8105c6af993
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Jake Petroules 2014-05-08 00:51:49 -04:00 committed by The Qt Project
parent a97f96ca8e
commit f2891be008

View File

@ -168,6 +168,15 @@ void MainWindow::setupMenuBar()
for (int i = 0; i < toolBars.count(); ++i)
toolBarMenu->addMenu(toolBars.at(i)->menu);
#ifdef Q_OS_OSX
toolBarMenu->addSeparator();
action = toolBarMenu->addAction(tr("Unified"));
action->setCheckable(true);
action->setChecked(unifiedTitleAndToolBarOnMac());
connect(action, SIGNAL(toggled(bool)), this, SLOT(setUnifiedTitleAndToolBarOnMac(bool)));
#endif
dockWidgetMenu = menuBar()->addMenu(tr("&Dock Widgets"));
}