Use the new unified toolbar implementation in examples on OS X.

Change-Id: Ica3476d16a4baab1f75e253eb406505f88018d47
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Jake Petroules 2014-05-05 23:49:21 -04:00 committed by The Qt Project
parent 41ef1095b4
commit 32742959a2
3 changed files with 12 additions and 0 deletions

View File

@ -173,6 +173,10 @@ MainWindow::MainWindow(QWidget *parent)
bottomBar->addWidget((uploadLimitLabel = new QLabel(tr("0 KB/s"))));
uploadLimitLabel->setFixedSize(QSize(fm.width(tr("99999 KB/s")), fm.lineSpacing()));
#ifdef Q_OS_OSX
setUnifiedTitleAndToolBarOnMac(true);
#endif
// Set up connections
connect(torrentView, SIGNAL(itemSelectionChanged()),
this, SLOT(setActionsEnabled()));

View File

@ -109,6 +109,10 @@ void MainWindow::actionTriggered(QAction *action)
void MainWindow::setupToolBar()
{
#ifdef Q_OS_OSX
setUnifiedTitleAndToolBarOnMac(true);
#endif
for (int i = 0; i < 3; ++i) {
ToolBar *tb = new ToolBar(QString::fromLatin1("Tool Bar %1").arg(i + 1), this);
toolBars.append(tb);

View File

@ -78,6 +78,10 @@ const QString rsrcPath = ":/images/win";
TextEdit::TextEdit(QWidget *parent)
: QMainWindow(parent)
{
#ifdef Q_OS_OSX
setUnifiedTitleAndToolBarOnMac(true);
#endif
setToolButtonStyle(Qt::ToolButtonFollowStyle);
setupFileActions();
setupEditActions();