Hi,

I want the user to be able to drag a QDockWidget onto my custom widget, so that the custom widget then takes ownership of the QDockWidget.

This is would be easy if Qt used Qt's dedicated drag-drop support for their dragging of QDockWidgets, but it seems they dont.
Rather it seems they do a lot of magic ontop of Qt::Hover* events. I gathered this from reading through Qt sourcecode.

Right now, the only feasible way to me seems:

1. Detect if left mouse-key is down and mouse has been hovering over my custom widget for x time.
2. Wait for mouseReleaseEvent if so.
3. Then check if QApplication::focusWidget() is a QDockWidget, and if so, that QDockWidget was drag-dropped on my customwidget.


That seems a bit unsatisfying though. Is there a "cleaner" solution?