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

Avoids issue #360 on qt.py example #409

Merged
merged 2 commits into from
Feb 18, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/qt.py
Original file line number Diff line number Diff line change
@@ -108,6 +108,8 @@ class MainWindow(QMainWindow):
def __init__(self):
# noinspection PyArgumentList
super(MainWindow, self).__init__(None)
# Avoids crash when shutting down CEF (issue #360)
self.setAttribute(Qt.WA_DeleteOnClose, True)
Copy link
Owner

Choose a reason for hiding this comment

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

Have you tested this code with pyqt4 and pyqt5? If not then maybe we should execute it only after checking the PYSIDE constant variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added the guard just in case

self.cef_widget = None
self.navigation_bar = None
if PYQT4: