I had some ideas about your question last time but I thought that my solution was not ideal. So if you're still struggling I'll try to answer.
Actually there's no any problem with getting mouse enter event and resizing your main window. The problem is that when you're dragging your QDockWidget
from the outside of your main window, the latter one loses focus and can't process that event.
My idea was to install an event filter to your QDockWidget
. In its implementation you should track QDockWidget
moving and global cursor position (QCursor::pos()
). If the cursor is currently inside your main window and QDockWidget
is moving, it means that you have dragged the QDockWidget
onto the main window and it should be resized if its size is less than some minimum size.