Qt for WebAssembly MultiPointTouchArea loses all touchpoints after just one is released
-
If I run the following code in the browser using Qt for webassembly I can shift points around, but if one of the two is released, shifting no longer works and this console messages appears:
qt.pointer.dispatch: skipping QEventPoint(id=1 ts=0 pos=0,0 scn=869,370 gbl=869,370 Updated ellipse=(8x8 ∡ 0) vel=0,0 press=-869,-370 last=-869,-370 Δ 869,370) : no target window
import QtQuick Window { visible: true Rectangle { anchors.fill:parent MultiPointTouchArea { anchors.fill: parent touchPoints: [ TouchPoint { id: point1 onPressedChanged: console.log('point1', pressed); }, TouchPoint { id: point2 onPressedChanged: console.log('point2', pressed); } ] } Rectangle { width: 200; height: width; color: "red" x: point1.x y: point1.y } Rectangle { width: 200; height: width; color: "green" x: point2.x y: point2.y } } }
I tested it with versions Qt5.15.2, Qt6.4.2, Qt6.5
and different browsers, but the same error occurs all the time.Link "test it yourself" Online live qml wasm
I debugged a little and it seems the error is in file:
C:\Qt\6.5.0\Src\qtbase\src\gui\kernel\qguiapplication.cppLine 2924: QPointer<QWindow> window = e->window; // the platform hopefully tells us which window received the event Line 2961: // If we somehow still don't have a window, we can't deliver this touchpoint. (should never happen) if (Q_UNLIKELY(!window)) { qCWarning(lcPtrDispatch) << "skipping" << &tempPt << ": no target window"; continue; }
here the window is lost.
How can i debug it further?
I also tested it with Qt under Windows, Linux, Android using diffrent versions. There everything works as expected (only using WebAssembly in the browser it doesn't)
-
Indeed it does. This is a bug, I will report it for you.
https://bugreports.qt.io/browse/QTBUG-110941