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

QML DropArea: Unable to reject external drag enter events, DropArea broken after that

    Details

    • Commits:
      570c848e6d546d35b408770e1b1d1d954268d519

      Description

      The following code seems to break QML DropArea as soon as you've dragged something into it once.

      How to reproduce:

      • Drag something into area
      • Notice that 'entered' is printed on the console
      • Drag something into area again
      • 'entered' is not printed again

      Expected behavior:

      • 'entered' is printed each time something is dragged into the area
      import QtQuick 2.2
      
      Rectangle {
          id: rect
          width: 200
          height: 200
      
          anchors.fill: parent
          DropArea {
              anchors.fill: parent
              onEntered: {
                  console.log("entered");
                  drag.accepted = false;
              }
          }
      }
      

        Attachments

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

          Activity

            People

            • Assignee:
              aalpert Alan Alpert
              Reporter:
              krf Kevin Funk
            • Votes:
              19 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes