Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Qt for WebAssembly MultiPointTouchArea loses all touchpoints after just one is released
Forum Updated to NodeBB v4.3 + New Features

Qt for WebAssembly MultiPointTouchArea loses all touchpoints after just one is released

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
2 Posts 2 Posters 407 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    oe7se
    wrote on last edited by oe7se
    #1

    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.cpp

    Line 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)

    1 Reply Last reply
    0
    • lorn.potterL Offline
      lorn.potterL Offline
      lorn.potter
      wrote on last edited by
      #2

      Indeed it does. This is a bug, I will report it for you.
      https://bugreports.qt.io/browse/QTBUG-110941

      Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
      Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved