1 Attachment(s)
MacOS Key_F9 becomes Key_8
Hi people!!!
I have a strange behaviour on MacOS X... On my QAction I have set the following
Code:
my1Action->setShortcut(Qt::Key_F9);
my1Action->setText(tr("My 1st action"));
connect(...)
my2Action->setShortcut(QSequence(Qt::SHIFT + Qt::Key_F9));
my2Action->setText(tr("My 2nd action"));
connect(...)
Now... why in my menu do I see the following???
(in the menu, F9 is replaced by a 8)...
Attachment 7542
This happens only on Mac, on windows it works pretty well.
Thanks for any hint...
Re: MacOS Key_F9 becomes Key_8
That's odd...
Does it happen for all keys or only F9?
Re: MacOS Key_F9 becomes Key_8
Hi Spitfire.
Thank you for taking the time to answer me :D
Only with F9... I saw on Mac documentation that Function keys from F9 to F12 are used by OSX to handle Dashbord and windows behaviour... I'm quite sure it is related...
Anyway, I could not find out why it uses the 8...
Re: MacOS Key_F9 becomes Key_8
Hi,
Code:
#include <QtGui>
int main(int argc, char *argv[])
{
my1Action->setShortcut(Qt::Key_F9);
my1Action->setText("My 1st action");
my2Action
->setShortcut
(QKeySequence(Qt
::SHIFT + Qt
::Key_F9));
my2Action->setText("My 2nd action");
m.addAction(my1Action);
m.addAction(my2Action);
m.setTitle("test");
w.menuBar()->addMenu(&m);
w.show();
return a.exec();
}
works just fine on my MacOSX 10.6.8 (MacBook Pro).
Re: MacOS Key_F9 becomes Key_8
Ok... that means it's a misconfiguration on my mac...
Thank you very much!
Added after 9 minutes:
I put up a Brand new Mac OS 10.7.3 machine... Installed Xcode and QT and...
there it is... F9 is replaced with an 8...
I'll investigate further, but I think this problem starts with the 10.7.3 update released in march 2012...