ShortCut doesn't work on MAC OS X
-
I create an action on the tool bar of main window and give it a shortcut given "Shift+F12", like the following:
QAction* pAction = new Action("MyAction", pToolBar);
pAction->setShortCut(QKeySequence("Shift+F12"));
pToolBar->addAction(pAction);but the shortcut doesn't work. The same code DOES work on Windows. Do somebody know it?
In addition, I use short cut in another way like the code below. It also doesn't work.
QShortcut* pShortcut = new QShortcut(QKeySequence("Shift+F12"), this, 0, 0, Qt::ApplicationShortcut);
connect(pShortcut, SIGNAL(activated()), SLOT(slt_ShortCut()));