mirror of https://github.com/qt/qtbase.git
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:
parent
41ef1095b4
commit
32742959a2
|
@ -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()));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue