QQuickWidget did not receive mouse release events after drag and drop
because the logic was so:
1) QWidgetWindow::handleMouseEvent() was called on press and
qt_button_down was set to the corresponding QQuickWidget;
2) After drag started, qt_button_down was set to 0 in
QApplicationPrivate::notifyDragStarted();
3) On mouse release QWidgetWindow::handleMouseEvent() was called again,
but because qt_button_down was 0
QApplicationPrivate::pickMouseReceiver() returned 0 and as a result
QWidgetWindow ignored the event and did not propagate it to QQuickWidget
for further processing.
The step 2 is a widgets-specific fix for QTBUG-26145 that does not work
for QQuickWidget (QtQuick has its own focus system).
Note that because Widgets and QtQuick do not share the sources, there is
no possibility to cast the pointer to check whether qt_button_down is
a QQuickWidget or some other QWidget-derived class object, so we have to
use QObject::inherits() method to check that.
Task-number: QTBUG-56713
Change-Id: I599b843e903c64329e6178752e0dc49f674bb890
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>