Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Looks like wrong behaviour of QDrag
yura_vel last edited by
I have QGraphicsScene that shows QWidget(s) via QGraphicsProxyWidget.
Widgets can exchange data through D&D. Widget produces QDrag item according to docs.
When QDrag object leaves area of QGraphicsProxyWidget I expect to receive dragLeaveEvent() for the particular proxy widget. But it happens not always.
IF the scene ACCEPTS event in the dragMoveEvent() outside the area of proxy then dragLeaveEvent() DO NOT INVOKES in the proxy.
IF the scene DO NOT ACCEPT event in the dragMoveEvent() outside the area of proxy then dragLeaveEvent() INVOKES.
A B C
A - the pixel inside proxy
B - the border of proxy
C - the scene area
I drag item from A to C and expect for dragLeaveEvent() in the proxy. But if QDrag is 'accepted' in points A and in the point C then no event. If QDrag is 'accepted' in A and 'rejected' in C dragLeaveEvent() happens in the proxy.
Is this expected behaviour? As for me dragLeaveEvent() should be invoked in both cases.
Hi and welcome to devnet,
Sounds like a reasonable expectation. You should look at the bug report system to see if it's something known. If not, please consider opening a bug providing a minimal compilable example showing that behavior.