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

QDragEnterEvent acceptance ignored

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Duplicate
    • Affects Version/s: 5.12.0
    • Fix Version/s: None
    • Component/s: GUI: Drag and Drop
    • Labels:
      None
    • Environment:
      Windows 10 x64
    • Platform/s:
      Windows

      Description

      There seems to be a regression in 5.12.0 (or perhaps in 5.11.2 / 5.11.3) that causes DragEnterEvents to not be accepted as intended. My code accepts the QDragEnterEvent, but by the time it returns to the application my event is no longer accepted. As a result, my QWidget subclass rejects all drag events.

      The regression seems to be in QWidgetWindow::handleDragMoveEvent() in Qt 5.12.0. It looks like the edits QWidgetWindow::handleDragEnterEvent() (called by forwardEvent()) modify the "event" object, which then gets overwritten in handleDragMoveEvent().

      (see qt-5-12-0 attachment, especially the right-hand portion of the screenshot)

      This seems to work as intended in Qt 5.11.1, which has similar code within the QWidgetWindow::handleDragEnterMoveEvent() function but the Accepted attribute was correctly attributed to the "translated" object, which then gets copied to the "Event" object.

      (see qt-5-11-1 attachment, especially the right-hand portion of the screenshot)

      I haven't tested 5.11.2 or 5.11.3 to verify whether this regression is present there.

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                paeglis Gatis Paeglis
                Reporter:
                phlucious Evon Silvia
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes