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

WASM: DropArea does not fire entered/exited

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P2: Important P2: Important
    • None
    • 6.4.1
    • GUI: Drag and Drop
    • None
    • WebAssembly

      Using a DragArea (with the stock wasm Qt build provided by the maintenance tool), does not properly emit entered and exited. Additionally, it does not react on drop every time.

      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Dragstar")
      
          DropArea {
              anchors.fill: parent
              onEntered: (drag) => {
                  console.log("### ENTERED")
                  dropIndicator.visible = true
              }
              onExited: () => {
                  console.log("### EXITED")
                  dropIndicator.visible = false
              }
              onDropped: (drop) => {
                  console.log("### DROPPED")
                  dropIndicator.visible = false
              }
          }
      
          Text {
              visible: !dropIndicator.visible
              anchors.centerIn: parent
              text: qsTr("Drag me some content!")
          }
      
          Rectangle {
             id: dropIndicator
             border.width: 12
             border.color: "green"
             anchors.fill: parent
             visible: false
             color: "grey"
      
             Text {
                 anchors.centerIn: parent
                 text: qsTr("Drop it...")
             }
         }
      }
      

      Expected:

      Show "ENTERED" when draging something over the browser window, show "EXITED" when leaving it again. Show "DROPPED" if something was dropped.

      Actual result: nothing happens on enter/leave. Nothing happens on some drops, on others there's the sequence of "ENTERED/DROPPED" when dropping.

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

            mikolaj.boc MikoĊ‚aj Boc (Inactive)
            cajus Cajus Pollmeier
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes