Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.6.1
-
None
-
Yocto 4.0.15 Kirkstone x86, 1920x1080 touchscreen
-
-
2a0b907f1 (dev), b1481a166 (6.8), 3dbfe75b4 (6.7), 4eeb4c3bf (tqtc/lts-6.5)
Description
Our project ugpraded from 5.14.2 to Qt 6.6.1 (on Yocto 4.0.15 Kirkstone, x86), and we found that the mouseDoubleClickEvent inside widgets was no longer being called.
Patch attached to this JIRA. Would be great if it was merged into the main branch for releases.
Comment in our patch MR as follows:
This issue is caused by an underlying qt issue whereby the event first/previous event position isn't getting persisted between taps. It's only a problem for synthesised events (i.e. touch events that are auto-translated into mouse events) which is why the mouse works and the touch panel does not. For synthesised events, the interactions with processTouchEvent mean that should be persisted in persistentEPD (devPriv->pointById()) is not actually persisted.
There is a second issue in the same area - not only is the position not correctly persisted, but the event time isn't either (so the second tap could be minutes later and would still be treated as a double tap) - there was an outstanding qt bug for this second issue (https://bugreports.qt.io/browse/QTBUG-100688) that qt have "bodged" to make it work. Their solution is ugly as it involves adding static variables into that function; I don't think this is the right way to fix it, however, this code is so complex and there are so many different scenarios to cater for that it's not trivial to fix without breaking something else. I expect qt will rework this in due course.
As such, I've taken the same approach for the position issue - we persist the last known position via a static variable. This fixes the double tap so that it now works as you'd expect.
The offending qt code (that this patch is fixing) can be found here: https://github.com/qt/qtbase/blob/6.6.1/src/gui/kernel/qguiapplication.cpp#L2249
Attachments
Issue Links
- is duplicated by
-
QTBUG-125911 Double-tap and the activated signal don't work in Android.
-
- Closed
-
- relates to
-
QTBUG-100688 TapHandler doesn't emit onDoubleTapped when using a touchscreen
-
- Closed
-
-
QTBUG-112479 Touch Drag doesn't cause mousePressEvent after Touch Press
-
- Closed
-
-
QTBUG-119032 Mouse Release is not fired with touch screen
-
- Closed
-
-
QTBUG-129794 QTest::mouseClick() and mouseDClick() don't actually apply the delay to each event in the sequence
-
- Closed
-