diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/network/torrent/mainwindow.cpp | 4 | ||||
-rw-r--r-- | examples/widgets/mainwindows/mainwindow/mainwindow.cpp | 4 | ||||
-rw-r--r-- | examples/widgets/richtext/textedit/textedit.cpp | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp index 649dbb0a77..3ac7d9dfdd 100644 --- a/examples/network/torrent/mainwindow.cpp +++ b/examples/network/torrent/mainwindow.cpp @@ -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())); diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp index fe54f4569a..a0eb063647 100644 --- a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp +++ b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp @@ -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); diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp index 128924ef4e..2ff7a09969 100644 --- a/examples/widgets/richtext/textedit/textedit.cpp +++ b/examples/widgets/richtext/textedit/textedit.cpp @@ -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(); |