Hi,
I have a problem with the event for Key_Space:
my code:
Qt Code:
  1. void MainWindow::keyPressEvent(QKeyEvent *event)
  2. {
  3. switch (event->key()) {
  4. case Qt::Key_Space: // THIS DOESNT WORK
  5. qDebug() << "space";
  6. break;
  7.  
  8. case Qt::Key_A: // THIS WORKS FINE
  9. qDebug() << "A";
  10. break;
  11. default:
  12. QWidget::keyPressEvent(event);
  13. break;
  14. }
  15. }
To copy to clipboard, switch view to plain text mode 

Do you know where is the mistake. Thx