Skip to content

QMenu.add_action() got an unexpected keyword argument 'shortcut' #472

@ronpandolfi

Description

@ronpandolfi

Since qtpy>=2.4, the shortcut= kwarg on QMenu.add_action() isn't working.

TypeError: add_action() got an unexpected keyword argument 'shortcut'

I notice that this method is now wrapped in a partial like this:

> qmenu.addAction
functools.partial(<bound method add_action of <PyQt5.QtWidgets.QMenu object at 0x00000158E93FBD90>>, old_add_action=<built-in function addAction>)

while in qtpy==2.3.0,

> qmenu.addaction
<function QMenu.addAction>

I haven't traced this further, but hopefully that's a start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions