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

Drag & Drop Events are lost in floating QDockWidget when AA_NativeWindows = true

    XMLWordPrintable

Details

    • a9a41961c6ef3627a8dd2bf69664c13d9cb20568

    Description

      See attached Creator Project. Drag inside the the view when it is docked, you'll see the drag move cursor. Undock (float) the view, then drag and drop doesn't work (cursor changes to "forbidden" symbol).

      I've debugged quite a while to find the cause, and as far as I can tell the issue is rooted in the way a QWidgetWindow is created.

      QWidgetWindow::handleDragEnterMoveEvent looks for the child under the current mouse pos:
      QWidget *widget = m_widget->childAt(event->pos());

      When native windows are off, m_widget will be the floating QDockWindow, but if native windows are on, m_widget will be the QMainWindow which naturally doesn't find a child at the given mouse pos.

      We can currently work around this because we decided to turn AA_NativeWindows off. However, we do use native widgets through qtwinmigrate, so we had to turn on AA_DontCreateNativeWidgetSiblings in addtion to work around this bug.

      Attachments

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

        Activity

          People

            andysh Andy Shaw
            jam Jakob Magiera
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes