Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

PR: [PyQt6] Add exec_/print_, and add QOpenGLWidget/QShortcut to QtWidgets #259

Merged
merged 4 commits into from
Oct 22, 2021

Conversation

kumattau
Copy link
Contributor

@kumattau kumattau commented Oct 21, 2021

PyQt6 document says

All exec_() and print_() methods have been removed.

https://www.riverbankcomputing.com/static/Docs/PyQt6/pyqt5_differences.html

But I think it is better that QtPy supports exec_() and print_()
because the latest PySide2 5.15.2 supports exec_() only and PySide2/PySide6 support print_() only.

I think we can simply assign exec to exec_ : QApplication.exec_ = QApplication.exec (print_ is also the same)

I picked up exec_ and print_ in PySide6, and add them to corresponding classes of PyQt6.

Additionally, I added QOpenGLWidget and QShortcut to QtWidgets of PyQt6 same as PySide6.

Related to: #233 (comment)

Fixes #258

@kumattau kumattau mentioned this pull request Oct 21, 2021
@ccordoba12 ccordoba12 added this to the v2.0.0 milestone Oct 21, 2021
@kumattau
Copy link
Contributor Author

I updated commit comments only

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 working on this! I left a comment/question regarding the QTextStreamManipulator import. Otherwise this LGTM 👍

qtpy/QtCore.py Outdated Show resolved Hide resolved
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 ! 👍

@dalthviz dalthviz merged commit d43d848 into spyder-ide:master Oct 22, 2021
@kumattau kumattau deleted the pyqt6-exec_-print_ branch October 22, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility with QtWidgets.QOpenGLWidget vs QtOpenGLWidgets.QOpenGLWidget
3 participants