Accept subsequent drag moves in QWidgetWindow if enter was accepted.
Add handling similar to QGuiApplicationPrivate::processDrag. Task-number: QTBUG-28008 Change-Id: I516531da242471cdfbb59418d0052b25f799f373 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
11b5c54f55
commit
72a0ce045c
@ -499,6 +499,10 @@ void QWidgetWindow::handleDragEnterMoveEvent(QDragMoveEvent *event)
|
||||
const QPoint mapped = widget->mapFromGlobal(m_widget->mapToGlobal(event->pos()));
|
||||
QDragMoveEvent translated(mapped, event->possibleActions(), event->mimeData(), event->mouseButtons(), event->keyboardModifiers());
|
||||
translated.setDropAction(event->dropAction());
|
||||
if (event->isAccepted()) { // Handling 'DragEnter' should suffice for the application.
|
||||
translated.accept();
|
||||
translated.setDropAction(event->dropAction());
|
||||
}
|
||||
QGuiApplication::sendSpontaneousEvent(widget, &translated);
|
||||
if (translated.isAccepted()) {
|
||||
event->accept();
|
||||
|
Loading…
Reference in New Issue
Block a user