PDA

View Full Version : Application-wide QShortcut



Tarigan
16th July 2012, 18:53
Hi all!
I have a QShortcut in MainWindow and it works fine until QMessageBox or any child QDialog exec.

QShortcut *sh = new QShortcut(QKeySequence(Qt::Key_F12),this);
sh->setContext(Qt::ApplicationShortcut);
QObject::connect(sh,SIGNAL(activated()),
this,SLOT(test_slot()));
Where is my mistake?

high_flyer
25th July 2012, 11:06
Where is my mistake?
Probably in your slot.