diff options
author | Andy Nichols <andy.nichols@nokia.com> | 2010-11-25 15:46:46 (GMT) |
---|---|---|
committer | Pierre Rossi <pierre.rossi@nokia.com> | 2010-11-25 15:48:15 (GMT) |
commit | 4ab5e3c6e2a7188d0b1f9ce57c461bb8f6d22cc9 (patch) | |
tree | 7b63749aa593b8978a6d522b2f932a61c3687e8d /src/gui/widgets/qabstractslider_p.h | |
parent | 985832eaf110d3decb32e7f984429e09e6bd6271 (diff) | |
download | Qt-4ab5e3c6e2a7188d0b1f9ce57c461bb8f6d22cc9.zip Qt-4ab5e3c6e2a7188d0b1f9ce57c461bb8f6d22cc9.tar.gz Qt-4ab5e3c6e2a7188d0b1f9ce57c461bb8f6d22cc9.tar.bz2 |
Allow QDial to wrap value when wrapping property is set.
QDial's wrapping property allows for 360 degree revolutions when using
the mouse. However whenever using the keyboard Up/Down/PageUp/PageDown
keys the QDial's value will stop at the minimum and maximum values.
This has been fixed to allow the bounds checker to account for the
wrapping property.
Merge-request: 2437
Reviewed-by: Pierre Rossi <pierre.rossi@nokia.com>
Diffstat (limited to 'src/gui/widgets/qabstractslider_p.h')
-rw-r--r-- | src/gui/widgets/qabstractslider_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qabstractslider_p.h b/src/gui/widgets/qabstractslider_p.h index 19d1fca..d044131 100644 --- a/src/gui/widgets/qabstractslider_p.h +++ b/src/gui/widgets/qabstractslider_p.h @@ -117,7 +117,7 @@ public: ; } - inline int bound(int val) const { return qMax(minimum, qMin(maximum, val)); } + virtual int bound(int val) const { return qMax(minimum, qMin(maximum, val)); } inline int overflowSafeAdd(int add) const { int newValue = value + add; |