Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
5.10.0
-
None
-
macOS 10.13.2, Qt Creator 4.5, Qt 5.10.0
Description
This is a new issue with Qt 5.10.0, Touch events (in addition to Mouse events) correctly appeared with Qt 5.9.2.
To reproduce, in main.cpp, set
QCoreApplication::setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents);
Create a TouchTest.cpp file with a class TouchTest that is derived from QQuickItem:
class TouchTest : public QQuickItem { Q_OBJECT protected: virtual bool childMouseEventFilter(QQuickItem* item, QEvent* event); }
In the overridden function, log the event type:
bool TouchTest::childMouseEventFilter(QQuickItem*, QEvent* event)
{
qDebug() << "Touch event type =" << event->type();
}
Create a test.qml file with a TouchTest component.
Build the application with Qt 5.10.0 (Qt Creator 4.5) on macOS 10.13.2, run it and make a swipe gesture with the mouse (click, move, release).
Result: One MouseButtonPress, several MouseMove and one MouseButtonRelease.
Expected: In addition to the mouse events, I would expect TouchBegin, TouchUpdate and TouchEnd events.
Note: Works fine when built with Qt 5.9.2 on macOS. Works fine when built with Qt 5.10.0 for iOS or Android.