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

QDragEnterEvent acceptance ignored

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.12.0
    • GUI: Drag and Drop
    • None
    • Windows 10 x64
    • 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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: