diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-03-23 10:44:05 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-03-23 12:14:43 +0000 |
commit | 2acf527d54049cfb17d1d2aaf4d77c97716e1dc6 (patch) | |
tree | 57c803313e941b13f8c58d30100425c6b43fd204 /src/quicktemplates2/qquickspinbox.cpp | |
parent | 9529225c849ee8e697767350cbb08e5f2845681b (diff) |
Combo|SpinBox: fix wheel event propagation
Sync the behavior with Qt Widgets. Don't propagate wheel events when
reaching the end. The behavior was not nice, that a ScrollView
underneath started suddenly moving whilst these input controls had
input focus.
Task-number: QTBUG-66044
Change-Id: I1b9c7f005652041cd82c77d4a1ca1a01d7d536e9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickspinbox.cpp')
-rw-r--r-- | src/quicktemplates2/qquickspinbox.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp index 04bdec43..7412936c 100644 --- a/src/quicktemplates2/qquickspinbox.cpp +++ b/src/quicktemplates2/qquickspinbox.cpp @@ -955,8 +955,7 @@ void QQuickSpinBox::wheelEvent(QWheelEvent *event) if (d->wheelEnabled) { const QPointF angle = event->angleDelta(); const qreal delta = (qFuzzyIsNull(angle.y()) ? angle.x() : angle.y()) / QWheelEvent::DefaultDeltasPerStep; - if (!d->stepBy(qRound(d->effectiveStepSize() * delta), true)) - event->ignore(); + d->stepBy(qRound(d->effectiveStepSize() * delta), true); } } #endif |