I am implementing a drag-and-drop action. My mouseMoveEvent code properly detects the beginning of a drag and creates a Drag object, loads it with mime data, and calls its exec(). However, I would like to know where the drop occurs. When I query the target() method of the drag object after it completes, it always returns None (this is in Python, PyQt5; I assume in C++ it would be null pointer?). The drop completes properly, dropping its mime data on the Mac OS desktop, or into another application, but the target() value is always the same, null.
So the I connect the drag object’s signal targetChanged to a slot in the source widget. Maybe I can see when it crosses a target boundary? The slot is never entered, no matter where I push the drag cursor, across widgets or out of the app boundary.
What is supposed to trigger the Drag::targetChanged signal?
↧