diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/widgets/widgets/qtoolbox.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/widgets/widgets/qtoolbox.cpp')
-rw-r--r-- | src/widgets/widgets/qtoolbox.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/widgets/widgets/qtoolbox.cpp b/src/widgets/widgets/qtoolbox.cpp index 46ade0277c..1c83485bff 100644 --- a/src/widgets/widgets/qtoolbox.cpp +++ b/src/widgets/widgets/qtoolbox.cpp @@ -294,7 +294,7 @@ QToolBox::QToolBox(QWidget *parent, Qt::WindowFlags f) { Q_D(QToolBox); d->layout = new QVBoxLayout(this); - d->layout->setMargin(0); + d->layout->setContentsMargins(QMargins()); setBackgroundRole(QPalette::Button); } @@ -437,7 +437,7 @@ void QToolBoxPrivate::relayout() Q_Q(QToolBox); delete layout; layout = new QVBoxLayout(q); - layout->setMargin(0); + layout->setContentsMargins(QMargins()); for (QToolBoxPrivate::PageList::ConstIterator i = pageList.constBegin(); i != pageList.constEnd(); ++i) { layout->addWidget((*i).button); layout->addWidget((*i).sv); @@ -504,7 +504,8 @@ int QToolBox::currentIndex() const } /*! - Returns a pointer to the current widget, or 0 if there is no such item. + Returns a pointer to the current widget, or \nullptr if there is + no such item. \sa currentIndex(), setCurrentWidget() */ @@ -512,7 +513,7 @@ int QToolBox::currentIndex() const QWidget * QToolBox::currentWidget() const { Q_D(const QToolBox); - return d->currentPage ? d->currentPage->widget : 0; + return d->currentPage ? d->currentPage->widget : nullptr; } /*! @@ -530,15 +531,15 @@ void QToolBox::setCurrentWidget(QWidget *widget) } /*! - Returns the widget at position \a index, or 0 if there is no such - item. + Returns the widget at position \a index, or \nullptr if there is + no such item. */ QWidget *QToolBox::widget(int index) const { Q_D(const QToolBox); if (index < 0 || index >= (int) d->pageList.size()) - return 0; + return nullptr; return d->pageList.at(index).widget; } |