You can get the key pressed with the function key(). A list of key codes can be found on this page of the document . So, if you want to use your Akey, you can either do
keyPressEvent( QKeyEvent * event )
{
if( event->key() == Qt::Key_A )
{
}
}
or directly use key code:
if( event->key() == 0x41 )
{
}
source
share