Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.3
-
37d3c7817fbde6db9f95863d1d0f3d6d9b96cea3 (qt/qtquickcontrols2/dev)
Description
When a stepSize is set on a Slider, it doesn't matter which snapMode (Slider.NoSnap) is set, it still snaps to the given stepSize.
Slider snapMode doc
Slider { from: 0 to: 100 value: 32 snapMode: Slider.NoSnap stepSize: 10 }
If you're investigating have a look at qquickslider.cpp:199. The handleMove() function will check if snapMode is set to SnapAlways and adjust the position.
- If live is false it will set the position according to the actual position of the handle. Setting live to false would be a workaround, but then the user doesn't get live updates, which means everything will be update after release of the handle.
- If live is true it either has a neglectable small stepSize or it will use stepSize regardless of what was set as snapMode to calculate the new position (see qquickslider.cpp:609).
Attachments
For Gerrit Dashboard: QTBUG-76136 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
329879,1 | Slider: Fix broken Slider.NoSnap snap mode | dev | qt/qtquickcontrols2 | Status: ABANDONED | 0 | 0 |
347424,6 | Slider: Fix broken NoSnap and SnapOnRelease mode | dev | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |