Hi all,
I'm trying to install a global action for a QWidget that has to be triggered when 'Esc' is pressed.
I try this code:
but it doesn't work. The function quickClose() is not called.Qt Code:
vClose->setShortcut(Qt::Key_Escape); connect(vClose,SIGNAL(triggered()),this,SLOT(quickClose())); addAction(vClose); // I'm in a QWidget subclassTo copy to clipboard, switch view to plain text mode
Instead if I put another key (such as Qt::Key_F4 or Qt::Key_F7, etc...) it gets called normally.
I could understand that Qt::Key_Escape and Qt::Key_Enter behave in a their own way...
So, what is my noobie mistake?
Bookmarks