You may install an event filter on each of the sliders. When your filter receives a wheel event, just return true to filter this event out.
Make QSliders ignore mouse wheel/scrolling
-
30-06-2022 - |
Question
I have a QScrollArea
with a set of custom sliders arranged on it. I have noticed that when trying to scroll through the scroll area, one of the sliders often ends up moving instead, which is not desirable.
To make the custom sliders ignore the scroll wheel, I think I need to override QAbstractSlider::wheelEvent
and just call ignore
in there. This might be a silly question, but is there a way to get this behavior without deriving yet another slider-related class?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow