Hi,

The title says it all. I want to do something evverytime my window is minimized, or put to background, everytime I switch to other window.
I thought it had to do with losing focus so I tried :

Qt Code:
  1. bool Note::eventFilter(QObject *object, QEvent *event)
  2. {
  3. if( event->type() == QEvent::FocusOut )
  4. {
  5. Note::writeToFile();
  6. return true;
  7. }
  8.  
  9. return false;
  10. }
To copy to clipboard, switch view to plain text mode 

with
Qt Code:
  1. installEventFilter(this);
To copy to clipboard, switch view to plain text mode 
on the cosntructor.

But it didn't work. It works with QEvent::KeyPress however.