Little is written about this in the documentation, so the question arose. Does this event work for regular widgets? How is it different from mouseMoveEvent ?
1 answer
In the official documentation, everything is perfectly described.
Yes, this event works for regular widgets. The difference from MouseMove is that the MouseHover event can receive parent widgets when they are overlaid by child widgets. Whereas, MouseMove gets only one widget above which the mouse cursor moves.
- Does this event fire even if the widget is blocked by the window? And how to redefine this event, what are the methods of this event called? Similar
mouseMoveEvent();- Nik - @Nik Probably handle, not override? You can handle any Qt event in the virtual function
event, the default implementation of which all specialized handlers, likemouseMoveEvent. - Cerbo - Well, I tried the
event();virtual functionevent();put theswitchand if the event typehovereventdo some actions, but this event did not work if the widget is overlapped by another widget / window, although you said it should. - Nik - @Nik I should not have written, but maybe! Try making
widget->setAttribute(Qt::WA_NoMousePropagation, false). - Cerbo - one@Nik This is another question, it is better to ask it separately. Well and so, try, for example, eventFilter - Cerbo
|