From 32742959a29c3340c91eb33b733fc8c2439b53e5 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 5 May 2014 23:49:21 -0400 Subject: Use the new unified toolbar implementation in examples on OS X. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ica3476d16a4baab1f75e253eb406505f88018d47 Reviewed-by: Morten Johan Sørvig --- examples/widgets/mainwindows/mainwindow/mainwindow.cpp | 4 ++++ examples/widgets/richtext/textedit/textedit.cpp | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'examples/widgets') 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(); -- cgit v1.2.3