Dear Friends,
I need to filter Esc key in Dialogs, i had reimplemented keyPressEvent(QKeyEvent *) just below,
but its not working


Qt Code:
  1. void myCLass::keyPressEvent(QKeyEvent *e)
  2. {
  3. if(e->key()==Qt::Key_Escape)
  4. {
  5. e->ignore();
  6. }
  7. else
  8. {
  9. QDialog::keyPressEvent(e);
  10. }
  11. }
To copy to clipboard, switch view to plain text mode 

i have set Focus Policy in my dialog object
Qt Code:
  1. win = new QDialog(this);
  2. win->setFocusPolicy(Qt::StrongFocus);
To copy to clipboard, switch view to plain text mode 

can any body help me t o fix this problem