Thnks for your example talk2amulya, I get the picture.
Also I've been reading Qt4 book and the solution is easier than the event filter, I implemente the event function and compare the event type to WindowDeactivate event, like this:

Qt Code:
  1. bool GLGraph3D::event(QEvent *event)
  2. {
  3.  
  4. if (event->type() == QEvent::WindowDeactivate)
  5. {
  6. if (TimerRotate != 0)
  7. {
  8. killTimer(TimerRotate);
  9. TimerRotate = 0;
  10. }
  11. }
  12.  
  13. return QWidget::event(event);
  14. }
To copy to clipboard, switch view to plain text mode 

It Works !!!!!!!!!!!!!!!!!!!!