I have searched all around and cannot get this to work! Attempting to call hide() within changeEvent in a way such as:

Qt Code:
  1. void AppWindow::changeEvent(QEvent *event)
  2. {
  3. if (event->type() == QEvent::WindowStateChange)
  4. if(isMinimized())
  5. {
  6. hide();
  7. }
  8. QMainWindow::changeEvent(event);
  9. }
To copy to clipboard, switch view to plain text mode 

causes the window to white-out rather than hide. Does anyone know why this happens or how to fix this? I am attempting to use a tray-icon on minimize, but without being able to hide will never have much success. Currently, the only way I can work around this is to use a singleShot timer to call the hide.