I am using KeyPressEvent
in my applicatiion. But letters from a to z are not working.
void mywindow::keyPressEvent(QKeyEvent *event)
{
switch(event->key())
{
case Qt::Key_Left:
break;
}
}
This is working properly
But when I'm using Key_R
or Key_L
it is not working.
Edit: keyReleaseEvent works with those letters.
Try this:
Or you can simply check key value using
QString QKeyEvent::text () const
method.