diff options
Diffstat (limited to 'src/widgets/widgets/qsplitter.cpp')
-rw-r--r-- | src/widgets/widgets/qsplitter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp index de838a8f93..e7a4889996 100644 --- a/src/widgets/widgets/qsplitter.cpp +++ b/src/widgets/widgets/qsplitter.cpp @@ -771,14 +771,13 @@ void QSplitterPrivate::setGeo(QSplitterLayoutStruct *sls, int p, int s, bool all if (!sls->handle->isHidden()) { QSplitterHandle *h = sls->handle; QSize hs = h->sizeHint(); - int left, top, right, bottom; - h->getContentsMargins(&left, &top, &right, &bottom); + const QMargins m = h->contentsMargins(); if (orient==Qt::Horizontal) { if (q->isRightToLeft()) p = contents.width() - p + hs.width(); - h->setGeometry(p-hs.width() - left, contents.y(), hs.width() + left + right, contents.height()); + h->setGeometry(p-hs.width() - m.left(), contents.y(), hs.width() + m.left() + m.right(), contents.height()); } else { - h->setGeometry(contents.x(), p-hs.height() - top, contents.width(), hs.height() + top + bottom); + h->setGeometry(contents.x(), p-hs.height() - m.top(), contents.width(), hs.height() + m.top() + m.bottom()); } } } @@ -1378,7 +1377,7 @@ bool QSplitter::event(QEvent *e) default: ; } - return QWidget::event(e); + return QFrame::event(e); } /*! @@ -1793,7 +1792,7 @@ void QSplitter::setStretchFactor(int index, int stretch) QTextStream& operator<<(QTextStream& ts, const QSplitter& splitter) { - ts << splitter.saveState() << endl; + ts << splitter.saveState() << Qt::endl; return ts; } |