IMHO you should ovveride this function on your QWindow:

Qt Code:
  1. bool QWidget::winEvent ( MSG * message, long * result ) [virtual protected]
To copy to clipboard, switch view to plain text mode