QML scene displayed with QQuickWidget doesn't get QHoverEvent when cursor leaves the widget.
In the example below the QML rectangle supposed to become red when cursor enters rectangle, and green when it leaves. It doesn't happen when the scene is displayed with QQuickWidget, though it works as intended when the scene is displayed with QWidget::createWindowContainer(...).
=== Example.qml ===
=== main.cpp ===
My current workaround, without touching Qt source code, is to install event filter on QQuickWidget, intercept events with type QEvent::Leave and, once caught, manually send QMouseMove event with QEvent::MouseMove type and ( – 1, – 1) coordinate to the off-screen window of the widget (that I get as widget->rootItem()->window()).