Skip to content

Commit 50acb91

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR #26646: Use standard method for closing QApp when last window is closed.
1 parent 956e32e commit 50acb91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_qt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _create_qApp():
140140
image = str(cbook._get_data_path('images/matplotlib.svg'))
141141
icon = QtGui.QIcon(image)
142142
app.setWindowIcon(icon)
143-
app.lastWindowClosed.connect(app.quit)
143+
app.setQuitOnLastWindowClosed(True)
144144
cbook._setup_new_guiapp()
145145
if qt_version == 5:
146146
app.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps)

0 commit comments

Comments
 (0)