summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2014-05-05 23:49:21 -0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-12 21:40:43 +0200
commit32742959a29c3340c91eb33b733fc8c2439b53e5 (patch)
treed008caaaa2e2b38d23c87d47a32e874f3527e1e4 /examples
parent41ef1095b4ef4786615f8987013233b4bd2b3b45 (diff)
Use the new unified toolbar implementation in examples on OS X.
Change-Id: Ica3476d16a4baab1f75e253eb406505f88018d47 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/network/torrent/mainwindow.cpp4
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.cpp4
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp4
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();