30 if accel is not None: |
30 if accel is not None: |
31 act.setShortcut(QKeySequence(accel)) |
31 act.setShortcut(QKeySequence(accel)) |
32 accel = prefClass.settings.value( |
32 accel = prefClass.settings.value( |
33 "Shortcuts/{0}/{1}/AltAccel".format(category, act.objectName())) |
33 "Shortcuts/{0}/{1}/AltAccel".format(category, act.objectName())) |
34 if accel is not None: |
34 if accel is not None: |
35 act.setAlternateShortcut(QKeySequence(accel)) |
35 act.setAlternateShortcut(QKeySequence(accel), removeEmpty=True) |
36 |
36 |
37 |
37 |
38 def readShortcuts(prefClass=Prefs, helpViewer=None, pluginName=None): |
38 def readShortcuts(prefClass=Prefs, helpViewer=None, pluginName=None): |
39 """ |
39 """ |
40 Module function to read the keyboard shortcuts for the defined QActions. |
40 Module function to read the keyboard shortcuts for the defined QActions. |