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

External Drag and Drops are erratic in QQuickWidget due to QQuickDragAttachedPrivate::deliverMoveEvent relying on having a Window.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.3.1
    • Quick: Widget
    • None
    • Windows 8

    Description

      When using external drags in a QQuickWidget inside a ListViewDelegate, the drag target behaves erratically (i.e. on mouse release it'll attach to the cursor) and other weird behavior.

      I believe this is due to QQuickDragAttachedPrivate::deliverMoveEvent/deliverLeaveEvent relying on having a window to send the leave event and hence the mousearea cannot cleanup afterwards.

      i.e. The function reads:

      void QQuickDragAttachedPrivate::deliverLeaveEvent()
      {
          if (window) {
              QDragLeaveEvent event;
              deliverEvent(window, &event);
              window = 0;
          }
      }
      

      And when stepping through with a debugger, window == nullptr.

      Update: See attached file for breaking case (comments for how to exhibit the behaviour)

      Looking back on this, it's not so much external drags, it's more "automatic" drags which are used for external drags. Sorry for the incorrect language.

      Attachments

        Issue Links

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

          Activity

            People

              lagocs Laszlo Agocs
              lmv Luke
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes