Posted By

mms007 on 07/05/10


Tagged


Versions (?)

make keyboard pressed exec ur wish


 / Published in: C++
 

  1. void MainWindow::keyPressEvent(QKeyEvent *event)
  2. {
  3.  
  4. switch (event->key())
  5. {
  6. //when keyboard "R" button is pressed
  7. case Qt::Key_R:
  8. //do this
  9. ui->pushButton->hide();
  10. break;
  11. }
  12. }

Report this snippet  

You need to login to post a comment.