summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qabstractslider.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/widgets/widgets/qabstractslider.cpp b/src/widgets/widgets/qabstractslider.cpp
index 283cac80da..92d2ffde2b 100644
--- a/src/widgets/widgets/qabstractslider.cpp
+++ b/src/widgets/widgets/qabstractslider.cpp
@@ -720,8 +720,16 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb
stepsToScroll = int(offset_accumulated);
#endif
offset_accumulated -= int(offset_accumulated);
- if (stepsToScroll == 0)
+ if (stepsToScroll == 0) {
+ // We moved less than a line, but might still have accumulated partial scroll,
+ // unless we already are at one of the ends.
+ if (offset_accumulated > 0.f && value < maximum)
+ return true;
+ if (offset_accumulated < 0.f && value > minimum)
+ return true;
+ offset_accumulated = 0;
return false;
+ }
}
if (invertedControls)