Skip to content

Commit

Permalink
Use string representation for QKeySequence construction
Browse files Browse the repository at this point in the history
This fixes an issue in PySide6 v6.6.2 where key sequence construction
with the | operator is broken, and improves readability.
  • Loading branch information
mborgerson committed Feb 22, 2024
1 parent 9bd175b commit 7a14177
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions qtconsole/frontend_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ def __init__(self, local_kernel=_local_kernel, *args, **kw):

# Configure actions.
action = self._copy_raw_action
key = QtCore.Qt.CTRL | QtCore.Qt.SHIFT | QtCore.Qt.Key_C
action.setEnabled(False)
action.setShortcut(QtGui.QKeySequence(key))
action.setShortcut(QtGui.QKeySequence("Ctrl+Shift+C"))
action.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
action.triggered.connect(self.copy_raw)
self.copy_available.connect(action.setEnabled)
Expand Down

0 comments on commit 7a14177

Please sign in to comment.