Hi Guys,

Trying to get my keypressevent working, but it's being stubborn:

Qt Code:
  1. void GLWidget::keyPressEvent(QKeyEvent *cKeyEventPtr)
  2. {
  3. qDebug() << m_bShow;
  4. qDebug() << cKeyEventPtr;
  5. if(cKeyEventPtr->key() == Qt::Key_F1 && m_bShow == ON)
  6. {
  7. qDebug() << m_bShow;
  8. this->hide();
  9. }
  10. else if(cKeyEventPtr->key() == Qt::Key_F1 && m_bShow == OFF)
  11. {
  12. qDebug() << m_bShow;
  13. this->show();
  14. }
  15. }
To copy to clipboard, switch view to plain text mode 

It's not showing any lines of code when I start bashing all my keys on my keyboard, so not sure why this is the case. My mouse click events are working fine .

I've got:

#include <QKeyEvent>