Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102308

QML Button clicked event does not fire every time in WebAssembly

XMLWordPrintable

    • WebAssembly

      I build a Qt application for the web using WebAssembly. I noticed that clicked events of QML buttons are not received every time. However, if I move the mouse between clicks, every event is is received. Here is a minimal example:

      import QtQuick 2.15
      import QtQuick.Window 2.15
      import QtQuick.Controls 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          Button {
              onClicked: console.log("clicked")
          }
      }
      

      When I compile this to a WebAssembly application and run it in the browser, I can see the debug output of the onClicked handler only every second time I click the button.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sorvig Morten Sørvig
            lefli Flavio Eiholzer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes