Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PR: Change to "Ctrl+F" because PyQt6 doesn't support Modifier + Key #183

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

kumattau
Copy link
Contributor

Hi,

This PR is for changing to "Ctrl+F" because PyQt6 doesn't support Modifier + Key.

With PyQt6, QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_F) in qtabrowser gives the following error:

  File "/home/qtawesome/qtawesome/icon_browser.py", line 111, in __init__
    QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_F),
TypeError: unsupported operand type(s) for +: 'Modifier' and 'Key'

I tested qtabrowser on the following PyQt6 version.

PyQt6                      6.2.0
PyQt6-Qt6                  6.2.0
PyQt6-sip                  13.1.0

@kumattau kumattau changed the title Change to "Ctrl+F" because PyQt6 doesn't support Modifier + Key PR: Change to "Ctrl+F" because PyQt6 doesn't support Modifier + Key Nov 22, 2021
@dalthviz dalthviz added this to the 1.1.1 milestone Nov 22, 2021
@kumattau
Copy link
Contributor Author

It was strange code, so I fixed it and pushed it again.

Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kumattau for checking the compatibility with PyQt6 and the fix for the shortcut. LGTM 👍

@dalthviz dalthviz merged commit d201b0b into spyder-ide:master Nov 22, 2021
@kumattau kumattau deleted the pyqt6-qkeysequence branch November 22, 2021 18:59
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants