QWheelEvent & Siblings/Children
-
Hi,
Does anyone know of an easy way to forward a QWheelEvent to a sibling or one specific child?
Currently I do this with a signal that has the QWheelEvent* as argument. But QWheelevent itself is protected, so I'll have to subclass the target Widget as well (a QDoubleSpinbox in this case) to create a public slot that forwards the QWheelEvent.
This seems like a rather hackish way to do this.
-
@J.Hilk said in QWheelEvent & Siblings/Children:
Currently I do this with a signal that has the QWheelEvent* as argument
why not directly forward the event to the child widget instead?
(usingQCoreApplication::sendEvent()
) -
@raven-worx said in QWheelEvent & Siblings/Children:
@J.Hilk said in QWheelEvent & Siblings/Children:
Currently I do this with a signal that has the QWheelEvent* as argument
why not directly forward the event to the child widget instead?
(usingQCoreApplication::sendEvent()
)Well, yes, that seems exactly like the proper way to do it!
I'll look further into it, thanks!
Yes this is exactly what I was looking for. Solved!