Hi there. I'm trying to make it so that the "aButton" will be pressed when the user presses the a key on the keyboard.

This is my code thus far. It compiles and runs, but pressing the a key on the keyboard does nothing.

QPushButton *aButton=new QPushButton("&aButton", this);

QShortcut aShortCut = new QShortcut(QKeySequence(Qt::Key_A), this);
QObject::connect(aShortCut, SIGNAL(clicked()), this, SLOT(toggle()));

Any ideas why it's not working?

Thanks!