Hi everyone,
I want to detect key press and mouse event from any widget. So I inherit QApplication and re implement the notify function.
I am able to detect mouse and key press event from any widget. But in some widget key press is not working fine. In lineEdit texts are not able to print escape key is not working in some widget.....

But if i remove the implementation of notify the all things are fine.


Qt Code:
  1. class MyApplication : public QApplication
  2. {
  3. Q_OBJECT
  4. public:
  5. MyApplication(int argc ,char** argv);
  6.  
  7. bool notify(QObject *obj, QEvent *e);
  8.  
  9.  
  10. };
To copy to clipboard, switch view to plain text mode 


Qt Code:
  1. bool MyApplication::notify(QObject *obj, QEvent *e)
  2. {
  3. return obj->event(e);
  4. }
To copy to clipboard, switch view to plain text mode 

Can anybody please tell me what is the problem ?

thanks.