title: Why Touchscreen don't work with WebAssembly?
body: <p>I'm developing an webassembly application that must use touchscreen.
  I studied the examples:
  dials
  fingerpaint
  knobs
  pinchzoom
  (see <a href="https://doc.qt.io/qt-6/touchinputexamples.html" rel="nofollow noreferrer">https://doc.qt.io/qt-6/touchinputexamples.html</a>)</p>
  <p>I tryed to run the tablet example (see <a href="https://doc.qt.io/qt-6/qtwidgets-widgets-tablet-example.html" rel="nofollow noreferrer">https://doc.qt.io/qt-6/qtwidgets-widgets-tablet-example.html</a>) compiled in webassembly but don't work.
  I have this problem:
  If I compile my application with MinGW kit (Desktop application), I'm able to move a dialog tapped on title section with my finger, and
  I can see the debug print that show the events below:</p>
  <pre><code>QEvent::WindowActivate
  QEvent::NonClientAreaMouseMove
  QEvent::NonClientAreaMouseButtonPress
  QEvent::NonClientAreaMouseButtonRelease
  QEvent::NonClientAreaMouseMove
  </code></pre>
  <p>If I compile my application with WebAssembly kit (WebAssembly application), I'm NOT able to move the dialog tapped on title.
  these are the event that I can see the event printed on console:</p>
  <pre><code>QEvent::MouseMove
  QEvent::MouseButtonRelease
  QEvent::MouseButtonPress
  </code></pre>
  <p>I tryed to repete the test with the WA_AcceptTouchEvents sets to false, befor and sets to true after. But I had the same behavior.</p>
  <p>My question is: how can I perform the same behaviour in both configurations
  I posted a minimal application affected for same issue
  The example is composed by a MainWindow that show a non modal dialog, across the menu file, open.
  The dialog is a simple default QDialog with two button (ok and cancel)
  My configuration:</p>
  <blockquote>
  <p>Qt Creator 7.0.0 Based on Qt 6.2.3 (MSVC 2019, 64 bit) From revision
  638b93591b</p>
  <p>Qt 6.3.0 WebAssembly with Emscripten 3.1.6 for C++</p>
  <p>Google Chrome Ver. 101.0.4951.54</p>
  </blockquote>
  <pre><code>// here the WasmDialog.pro file 
  
  QT       += core gui
  
  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  
  CONFIG += c++17
  
  SOURCES += \
      ExtGraphicsWidget.cpp \
      WasmDialog.cpp \
      main.cpp \
      MainWindow.cpp
  
  HEADERS += \
      ExtGraphicsWidget.h \
      MainWindow.h \
      WasmDialog.h
  
  FORMS += \
      mainwindow.ui \
      wasmdialog.ui
  
  qnx: target.path = /tmp/$${TARGET}/bin
  else: unix:!android: target.path = /opt/$${TARGET}/bin
  !isEmpty(target.path): INSTALLS += target
  
  
  // here main.cpp code:
  
  #include &quot;MainWindow.h&quot;
  
  #include &lt;QApplication&gt;
  
  int main(int argc, char *argv[])
  {
      QApplication a(argc, argv);
      MainWindow w;
      w.show();
      return a.exec();
  }
  
  // here the MainWindow.h file 
  
  #ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  #include &quot;WasmDialog.h&quot;
  
  QT_BEGIN_NAMESPACE
  namespace Ui { 
      class MainWindow; 
  }
  
  QT_END_NAMESPACE
  
  class QGraphicsView;
  class QGraphicsScene;
  class ExtGraphicsWidget;
  
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
      public:
          MainWindow(QWidget *parent = nullptr);
          ~MainWindow();
  
      private:
          Ui::MainWindow *ui;
          WasmDialog moWD;
          QGraphicsView *mpView;
          QGraphicsScene *mpScene;
  };
  #endif // MAINWINDOW_H
  
  // here the MainWindow.cpp file 
  
  #include &quot;MainWindow.h&quot;
  #include &quot;ui_mainwindow.h&quot;
  
  #include &lt;ExtGraphicsWidget.h&gt;
  
  #include &lt;QGraphicsView&gt;
  #include &lt;QGraphicsAnchorLayout&gt;
  
  MainWindow::MainWindow(QWidget *parent)
      : QMainWindow(parent)
      , ui(new Ui::MainWindow)
      , mpView(nullptr)
      , mpScene(nullptr)
  {
      ui-&gt;setupUi(this);
      setAttribute(Qt::WA_AcceptTouchEvents, false);
  
      connect(ui-&gt;actionOpen, &amp;QAction::triggered, &amp;moWD, &amp;WasmDialog::show);
  
      mpScene = new QGraphicsScene(this);
      mpView = new QGraphicsView(this);
      mpView-&gt;setScene(mpScene);
      setCentralWidget(mpView);
  } // ctr
  
  MainWindow::~MainWindow()
  {
      if (nullptr != mpScene)
      {
          delete mpScene;
      } // end if nullptr != mpScene)
  
      if (nullptr != mpView)
      {
          delete mpView;
      } // end if nullptr != mpView)
  
      delete ui;
  } // dtr
  
  // here the WasmDialog.h file 
  
  #ifndef WASMDIALOG_H
  #define WASMDIALOG_H
  
  #include &lt;QDialog&gt;
  
  namespace Ui 
  {
      class WasmDialog;
  }
  
  class WasmDialog : public QDialog
  {
      Q_OBJECT
  
      public:
          explicit WasmDialog(QWidget *parent = nullptr);
          ~WasmDialog();
  
      protected:
          bool event(QEvent *event) override;
          void tabletEvent(QTabletEvent *event) override;
  
      private:
          Ui::WasmDialog *ui;
  };
  
  #endif // WASMDIALOG_H
  
  // here the WasmDialog.cpp file 
  
  #include &quot;WasmDialog.h&quot;
  #include &quot;ui_wasmdialog.h&quot;
  
  #include &lt;QDebug&gt;
  #include &lt;QMoveEvent&gt;
  
  WasmDialog::WasmDialog(QWidget *parent) :
      QDialog(parent),
      ui(new Ui::WasmDialog)
  {
      ui-&gt;setupUi(this);
      setAttribute(Qt::WA_AcceptTouchEvents, false);
      setWindowFlags(windowFlags() | Qt::WindowTitleHint);
  
  } // ctr
  
  WasmDialog::~WasmDialog()
  {
      delete ui;
  } // dtr
  
  bool WasmDialog::event(QEvent *event)
  {
      qDebug() &lt;&lt; &quot; e-&gt;type &quot; &lt;&lt;  event-&gt;type();
      return QDialog::event(event);
  }
  
  void WasmDialog::tabletEvent(QTabletEvent *event)
  {
      switch (event-&gt;type())
      {
          case QEvent::TabletPress:
          case QEvent::TabletMove:
          {
              qDebug() &lt;&lt; &quot; e-&gt;type &quot; &lt;&lt;  event-&gt;type();
              break;
          }
          case QEvent::TabletRelease:
          {
              qDebug() &lt;&lt; &quot; e-&gt;type &quot; &lt;&lt;  event-&gt;type();
              update();
              break;
          }
          default:
          {
              break;
          }
      }
      QDialog::tabletEvent(event);
  }
  </code></pre>