def load_shortcuts():
 global SHORTCUTS, CUSTOM_SHORTCUTS
 settings = QSettings(SETTINGS_PATH, QSettings.IniFormat)
 for action in SHORTCUTS:
  default_action = SHORTCUTS[action].toString()
  shortcut_action = settings.value((u'shortcuts/%s' % action), default_action)
  CUSTOM_SHORTCUTS[action] = QKeySequence(shortcut_action)

def load_shortcuts ( ) : global SHORTCUTS , CUSTOM_SHORTCUTS settings = QSettings ( SETTINGS_PATH , QSettings . IniFormat ) for action in SHORTCUTS : default_action = SHORTCUTS [ action ] . toString ( ) shortcut_action = settings . value ( ( u'shortcuts/%s' % action ) , default_action ) CUSTOM_SHORTCUTS [ action ] = QKeySequence ( shortcut_action )
loads the shortcuts from qsettings .