code: def register_widget_shortcuts(self, widget):
          
          for qshortcut, context, name in widget.get_shortcut_data():
              self.register_shortcut(qshortcut, context, name)
docs: Register widget shortcuts.
  
          Widget interface must have a method called 'get_shortcut_data'