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:
parent
a97f96ca8e
commit
f2891be008
@ -168,6 +168,15 @@ void MainWindow::setupMenuBar()
|
|||||||
for (int i = 0; i < toolBars.count(); ++i)
|
for (int i = 0; i < toolBars.count(); ++i)
|
||||||
toolBarMenu->addMenu(toolBars.at(i)->menu);
|
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"));
|
dockWidgetMenu = menuBar()->addMenu(tr("&Dock Widgets"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user