Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.10.1
-
None
Description
Sometimes, with a QQuickWindow, it can be necessary to handle drop events in C++ for areas that are not covered by a DropArea Qml item. This seems impossible because QQuickWidget::dragEnterEvent always accepts the event, regardless of what its internal QQuickWindow had set as event acceptance. From qquickwidget.cpp:
void QQuickWidget::dragEnterEvent(QDragEnterEvent *e) { Q_D(QQuickWidget); d->offscreenWindow->event(e); e->accept(); // <-- This line overrides any informative e->setAccepted // that might have been set before. }
Then if I derive QQuickWidget and overload dragEnterEvent, I cannot know whether I should handle the event or not after having called QQuickWidget::dragEnterEvent, as it always be marked as accepted whether Qml code did accept it or not.