QSlider and singleStep
-
so this is annoying the
singleStep
only works with keyboard key inputs but when dragging the slider with the mouse it ignores it!i've set the
singleStep = 2
so and themin=2
andmax=256
and i want to step by 2 and not 1 when using the mouse on the slider!any fix / workaround for this at all?
-
so this is annoying the
singleStep
only works with keyboard key inputs but when dragging the slider with the mouse it ignores it!i've set the
singleStep = 2
so and themin=2
andmax=256
and i want to step by 2 and not 1 when using the mouse on the slider!any fix / workaround for this at all?
If you grab the slider handle with your mouse, it doesn't use steps. You can move it around independently.
Steps are used when navigating the handle with your keyboard.Arrow keys for single steps, PageUp/Down for pageSteps...
There is no workaround, you have to code your own, custom slider :)
-
There's nothing to fix. I think you misunderstand what
singleStep
purpose is. If it affected dragging it would defeat the whole point of a slider.If you want only even values just divide your range by 2 i.e. min=1, max=128 and then multiply the value by 2.