diff options
-rw-r--r-- | src/gui/widgets/qabstractscrollarea.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qplaintextedit.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 7d81d5a..1a4ee2b 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -946,7 +946,7 @@ bool QAbstractScrollArea::event(QEvent *e) if (g) { QScrollBar *hBar = horizontalScrollBar(); QScrollBar *vBar = verticalScrollBar(); - QPointF delta = g->lastOffset(); + QPointF delta = g->delta(); if (!delta.isNull()) { if (QApplication::isRightToLeft()) delta.rx() *= -1; diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index 0de7421..18adc6c 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -1465,7 +1465,7 @@ bool QPlainTextEdit::event(QEvent *e) // QPlainTextEdit scrolls by lines only in vertical direction QFontMetrics fm(document()->defaultFont()); int lineHeight = fm.height(); - int newX = hBar->value() - g->lastOffset().x(); + int newX = hBar->value() - g->delta().x(); int newY = d->originalOffsetY - offset.y()/lineHeight; hBar->setValue(newX); vBar->setValue(newY); |