Does Qt provide a way to get notified when the user starts and/or stops moving or resizing a top-level window?

110 views Asked by At

While answering a different StackOverflow question I realized that a 100% correct solution would need to know when the Qt application's window was being dragged or resized by the user's mouse, so that it would refrain from moving or resizing itself during that period, and thereby avoid "fighting with the user" for control of the window.

However, I don't know of any mechanism for a Qt app to be notified when the user pressed down the left-mouse button on the window's title bar, or when the user releases the left-mouse button afterwards... I assume that is because that functionality is handled by the OS's window-manager rather than by the Qt library. That said, is there any secret way to do it? Cross-platform would be best, but OS-specific solution are also of interest.

0

There are 0 answers