Is there a way to find out if a mouse key is pressed or released on the border of a QMainWindow? I'm trying to accurately find out when the user has stopped resizing my mainwindow by using the mouse keys to figure out when the user "lets go" of the window.

I was trying to see if I could detect the mouse button state inside the resize event of my QMainWindow, but everytime I query the button state, its always printing the
"resizing stopped! Mouse button is released!"
message.

Any suggestions?
Paul

Here's what I was trying:
Qt Code:
  1. void
  2. MainWindowDlg::resizeEvent ( QResizeEvent * pEvent )
  3. {
  4. if ( QApplication::mouseButtons() != Qt::NoButton)
  5. {
  6. printf("Resizing and mouse button is still down!\n");
  7. return;
  8. }
  9. else
  10. {
  11. printf("Resizing stopped! Mouse button is released!\n");
  12. return;
  13. }
  14. ...
To copy to clipboard, switch view to plain text mode