hi, i write a simple example, it function to print the key value
this is the code:
Qt Code:
  1. bool MainWindow::event(QEvent *event)
  2. {
  3. if (event->type() == QEvent::KeyPress)
  4. {
  5. QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
  6.  
  7. qDebug()<<"kev value "<<keyEvent->key();
  8. }
  9.  
  10. return QMainWindow::event(event);
  11. }
To copy to clipboard, switch view to plain text mode 

but some time can not get some key value, for example end, up, down, page down key value can not print out.

please tell me what why, and have a good example to get key value.
thanks.