code: def apply_shortcuts(self):
          
          toberemoved = []
          for index, (qobject, context, name,
                      add_sc_to_tip) in enumerate(self.shortcut_data):
              keyseq = QKeySequence( get_shortcut(context, name) )
              try:
                  if isinstance(qobject, QAction):
                      if sys.platform == 'darwin' and \
                        qobject._shown_shortcut == 'missing':
                          qobject._shown_shortcut = keyseq
                      else:
                          qobject.setShortcut(keyseq)
                      if add_sc_to_tip:
                          add_shortcut_to_tooltip(qobject, context, name)
                  elif isinstance(qobject, QShortcut):
                      qobject.setKey(keyseq)
              except RuntimeError:
                  # Object has been deleted
                  toberemoved.append(index)
          for index in sorted(toberemoved, reverse=True):
              self.shortcut_data.pop(index)
docs: Apply shortcuts settings to all widgets/plugins