hi,

i m trying to capture the key press event. Now, this works for all other keys except the Tab key. What could be the problem?? Here is the code

Qt Code:
  1. Image_check::Image_check(QWidget *parent, Qt::WFlags flags)
  2. : QWidget(parent, flags)
  3. {
  4. ui.setupUi(this);
  5. ui.pushButton->setFocus();
  6. /* ui.pushButton->setFocusPolicy(Qt::StrongFocus );
  7.   ui.pushButton_2->setFocusPolicy(Qt::StrongFocus );*/
  8.  
  9. }
  10. void Image_check::keyPressEvent(QKeyEvent *e)
  11. {
  12. if(e->key() == Qt::Key_Tab)
  13. {
  14. if(sender() == ui.pushButton)
  15. {
  16. QMessageBox::information(this, "Application name",
  17. "first"
  18. "The factory default will be used instead.");
  19. }
  20. else
  21. {
  22. QMessageBox::information(this, "Application name",
  23. "second"
  24. "The factory default will be used instead.");
  25. }
  26. QWidget::keyPressEvent(e);
  27. }
  28. else
  29. QWidget::keyPressEvent(e);
  30. }
To copy to clipboard, switch view to plain text mode 
I need to capture the Tab key..and that only is not working
Please tell ur suggestions on this..Thanx

Amulya