
In the specific case of Wheel type event, Qt strongly recommends to explicitly accept() or ignore() the event (especially ignore() is important to ensure the event is pushed to parent). This is kind of coding challenge I'd have liked to look at.

Neither impose sub-classing nor having to hardcode focus policy is an acceptable solution. It sets the focus policy of a spin box as soon as it becomes visible and only accepts wheel events if the spin box has the focus. Here is my solution that works without sub-classing and without touching client code. One of the solutions offer a way without sub-classing but it still requires to explicitly set the focus policy in client code which is cumbersome too.


IMO this is not a good alternative as it cannot be guaranteed that nowhere a QSpinBox or QDoubleSpinBox is used - hence no consistent behaviour possible. Re: reOpen disable mouse wheel event on ComboBox Post by openBrain Wed 1:22 pm wmayer wrote: Wed 12:14 pm Most of the suggestions in the SO thread offer a way by sub-classing. Most of the suggestions in the SO thread offer a way by sub-classing.
