daj
daj

Reputation: 7183

Qt: Are keyboard shortcut assignments (using "&") in Qt apps not working for Mac OSX?

In a QDialog, keyboard shortcuts are supposed to be assigned by & and one is supposed to be able to tab through the widgets on the shortcut. For example (from Blanchette and Summerfield's book):

caseCheckBox = new QCheckBox(tr("Match &case"));

should assign "alt-c" as a shortcut to the checkbox in a dialog. Neither tabbing through widgets, nor the & shortcuts seem to work when I compile my apps on a mac running OSX 10.6. Is this a known limitation of the Mac skin? Is there a workaround?

Upvotes: 2

Views: 824

Answers (1)

Exa
Exa

Reputation: 4110

From the Qt 4.8 documentation:

On Mac, shortcuts are disabled by default. Call qt_set_sequence_auto_mnemonic() to enable them.

See the QShortcut documentation for details.

Upvotes: 1

Related Questions