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

No reaction on mouse press in browser

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.15
    • 5.13.2, 5.14.2
    • None
    • WebAssembly

    Description

      QML application which contains the next simple code will not recieve mouse events:

      import QtQuick 2.13
      import QtQuick.Window 2.13
      import QtGraphicalEffects 1.0
      
      Window {
          id: win
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          color: ma.containsPress ? "#ff0000" : "#fff"
      
          Item {
              width: win.width
              height: win.height
      
              Rectangle {
                  anchors {
                      top: parent.bottom
                  }
                  width: 300
      
                  radius: 10
      
                  layer {
                      enabled: true
                      effect: DropShadow {
                          radius: 10
                          color: "#33000000"
                          verticalOffset: 5
                      }
                  }
      
              }
      
              MouseArea {
                  id: ma
                  anchors.fill: parent
                  onClicked: console.log("work")
      
                  Component.onCompleted: {
                      console.log("mouse area ready", width, height)
                  }
              }
          }
      
      }
      
       
      

       

      On Qt 5.14.2 generates the error

      061f6136-50285:598 Uncaught RuntimeError: float unrepresentable in integer range
          at wasm-function[50285]:0x10831a7
          at wasm-function[50351]:0x108a20a
          at wasm-function[25475]:0x8971d8
          at Module.dynCall_iiii (eval at completeLoadEmscriptenModule (http://localhost/app/app/qtloader.js:443:14), <anonymous>:1:351614)
          at Object.mouseEventHandlerFunc [as handlerFunc] (eval at completeLoadEmscriptenModule (http://localhost/app/app/qtloader.js:443:14), <anonymous>:1:286938)
          at HTMLCanvasElement.jsEventHandler (eval at completeLoadEmscriptenModule (http://localhost/app/app/qtloader.js:443:14), <anonymous>:1:169500)
      

      Attachments

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

        Activity

          People

            lpotter Lorn Potter
            lixcode Lelitac Vasile
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes