How to stop QSlider being affected by mousewheel unless selected?
Unsolved
General and Desktop
-
I've created a control that contains a QSlider in it. This control is in turn embedded in a scroll panel. When the user mouses over the scroll panel and scrolls the mouse wheel, my entire control within the panel scrolls - until the slider moves under the mouse cursor at which point the component suddenly switches from scrolling the component to moving the slider bar.
Is there any way to avoid this? I would like to either disable mouse wheel scrolling entirely for my slider or have it so that the slider will only scroll if it is selected.
-
Hi,
You could use an event filter that you'd disable when your widget has the focus.