How to Make Accelerator with & Sign to Work on Mac?
-
wrote on 14 Nov 2019, 02:02 last edited by
Hi,
I'm on QT 5.13.2.
When I create a button with QPushButton("&Set", this), I can trigger it with alt+s on Windows.
However, I tried command+s, option+s, control+s on Mac, and none of them works.
Is this a bug?
Thanks for your help, -
Hi,
Can you provide a minimal compilable example that shows that behaviour ?
What version of macOS are you running ? -
Hi,
Can you provide a minimal compilable example that shows that behaviour ?
What version of macOS are you running ?wrote on 15 Nov 2019, 19:29 last edited by@SGaist According to QShortcut doc, "On Mac, shortcuts are disabled by default."
I found this post to make it work somewhat.
https://www.qtcentre.org/threads/39097-Keyboard-shortcuts-(Mac-specific-) -
Right, I forgot that part.
The "workaround" is explained in the QKeySequence documentation linked from the QShortcut one.
1/4