I am writing on QT. OpenGL is connected, work properly, but the events and keyPressEvent mousePressEvent not respond to keystrokes.
class MainWindow : public QGL
Make sure that the MainWindow accepts Focus by setting
QWidget::setFocusPolicy()
Also you should call the base implementation of QWidget::keyPressEvent as stated here. Is there another Widget which has the focus and does not pass the KeyEvent?