-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Qt Embedding w/ Spyder #13400
Copy link
Copy link
Closed
Labels
DocumentationGUI: QtGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!
Milestone
Metadata
Metadata
Assignees
Labels
DocumentationGUI: QtGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!
Type
Fields
Give feedbackNo fields configured for issues without a type.
I have found a solution to a bug when using the script on:
https://matplotlib.org/gallery/user_interfaces/embedding_in_qt_sgskip.html
with the Spyder IDE (v3.3.2)
If the script is run as presented, two issues are present:
Issue 1: The qapp.exec_() does not terminate when the window is closed.
This was resolved for me by adding:
QtWidgets.QApplication.setQuitOnLastWindowClosed(True)before qapp.exec_() is called:
Issue 2: When this script is called multiple times in the IPython console, the Kernel dies and must be restarted. Per the comment thread on issue #4349, this is solved by replacing:
qapp = QtWidgets.QApplication(sys.argv)with
Can this be added to the example script?
Matplotlib version