Priority: P1: Critical
Affects Version/s: 6.1.1, 6.1.2, 6.2.0 Beta1
Fix Version/s: None
Component/s: Quick: Mouse Touch and Tablet input
Environment:Operating System: Ubuntu 20.04.2 LTS
Architecture: 64 bit
Window manager: GNOME Version 3.36.8
Windowing System: X11
In version 5.15.2 it was possible to receive positionChanged signals in a single-threaded window by setting hoverEnabled to true within a MouseArea; this does not seem to work in at least Qt 6.1.1 or 6.2.0-beta1.
The functionality can be demonstrated in version 5.15.2 by starting with the QQuickRenderControl Example (https://doc.qt.io/qt-5/qtquick-rendercontrol-example.html) :
- download and build the QQuickRenderControl example
- add a mouseMoveEvent override to window_singlethreaded.h
- implement the mouseMoveEvent method in window_singlethreaded.cpp using the existing mousePressEvent and mouseReleaseEvent methods as a guide:
- update the MouseArea within demo.qml to set
and to report receipt of positionChanged signals:
Console log messages are generated as the user moves the mouse over the main window.
The using Qt version 6.1.1 or 6.2.0 no output is generated unless a mouse button is pressed. Qt 5.15.2 generates the expected output.
The attached zip file contains projects that have the above changes applied to example code from Qt5.15.2 and similar changes applied to examle code from Qt 6.1.1 and Qt 6.2.0-beta1
In the Qt 6.x.x examples, pressing and dragging the mouse correctly shows receipt of the positionChanged signal whether hoverEnabled is true or false.
However, in the Qt6.x.x examples, setting hoverEnabled to true has no effect and the onPositionChanged handler is not triggered unless a button is pressed.
The problem seems to also affect the containsMouse property and entered and exited signal handling but these are not demonstrated in the attached as I suspect they are effects of the same root cause.