Details
-
Bug
-
Resolution: Incomplete
-
P1: Critical
-
None
-
6.4.3, 6.5.0
-
None
Description
When using a PointHandler inside a Rectangle (which does contain only a separate DragHandler) with touch events, it is very easy to get into the following situation:
```
QQuickPointHandler(0x563111243900) QEventPoint(id=1190 ts=15068991 pos=458.929,212.487 scn=468.929,432.487 gbl=540.929,496.487 Pressed vel=0,0 press=458.929,212.487 last=458.929,212.487 Δ 0,0) true via QQuickDeliveryAgent(root=QQuickRootItem)
QEventPoint(id=1190 ts=15068991 pos=458.929,212.487 scn=468.929,432.487 gbl=540.929,496.487 Pressed vel=0,0 press=458.929,212.487 last=458.929,212.487 Δ 0,0) QPointingDevice::GrabPassive QQuickPointHandler(0x563111243900)
QQuickPointHandler(0x563111243900) pointId 4a6 is missing from current event, but was neither canceled nor released
```
This breaks the pointer handler indefinitely, until either the qml component is reloaded, if one was lucky enough to have it in a loader, or the client is restarted. I would expect such invalid events to be discarded from the PointerHandler - so the user loses some of his touch input on invalid interactions, but at least can continue using the software afterwards.
What would be a good way to fix/mitigate this issue? It is reprodusible within the first 30secs to a minute of random clicking inside the item within the Area of the PointHandler.
I already tried wrapping it in a MouseArea, as some forum posts suggest, which did nothing.
Here is my simple setup:
```
Item {
id: control
PointHandler {
id: selectionRectangleHandler
// Any TakeOvers should be explicitly forbidden. Otherwise touch events break regularly
grabPermissions: PointerHandler.TakeOverForbidden
target: Rectangle
{ id: selectionRectangle x: Math.min(dragEndPoint.x, dragStartPoint.x) y: Math.min(dragEndPoint.y, dragStartPoint.y) // and some bindings for width and height to draw it from start to end parent: control visible: selectionRectangleHandler.active property point dragStartPoint property point dragEndPoint }onPointChanged: {
if (active)
}
onGrabChanged: (transition, point) => {
if (point.state & Qt.TouchPointPressed)
// Most of the grabs here are passive and passive ungrabs are never delivered for touch events, which seems to be the problem
}
onActiveChanged: {
if (!active)
}
}
}
```
Attachments
Issue Links
- relates to
-
QTBUG-113005 Tap handlers are broken on Android.
-
- Closed
-