[PyQt] problem setting multiple shortcuts for QAction
Baz Walter
bazwal at ftml.net
Tue Jul 8 15:44:05 BST 2014
On 07/07/14 18:58, Wilo Denja wrote:
> Hi,
>
> I'm trying to set two shortcuts for the same QAction in PyQt5, using the
> following code:
>
> zoom_in_action = QtWidgets.QAction('Increase Text Size', self)
> zoom_in_action.setShortcuts(['Ctrl++', 'Crtl+='])
>
> The primary shortcut (i.e. the first one) works fine, but the second
> does not. If I swap the two key sequences around, then it's the same --
> the primary one works, the other does not.
>
> It should work this way, shouldn't it? Should I file a bug? Is there a
> workaround, perhaps?
You should file a bug with the person who wrote that code, because it
seems they don't always spell "Ctrl" correctly...
--
Regards
Baz Walter
More information about the PyQt
mailing list