Skip to content

no 'close_event' emitted with Qt4Agg backend #711

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

Closed
geggo opened this issue Feb 23, 2012 · 2 comments
Closed

no 'close_event' emitted with Qt4Agg backend #711

geggo opened this issue Feb 23, 2012 · 2 comments
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. status: confirmed bug

Comments

@geggo
Copy link

geggo commented Feb 23, 2012

Dear developers,

it seems no 'close_event' is emitted when a figure is closed when using the qt4 backend. A short program demonstrating the behaviour:

import matplotlib

matplotlib.use('TkAgg')

matplotlib.use('Qt4Agg')
import matplotlib.pyplot as plt
def onclose(event):
print 'onclose'
f = plt.figure(1)
f.canvas.mpl_connect('close_event', onclose)
plt.show()

With other backends (TkAgg, WxAgg) the callback is executed on closing a figure.

As a consequence of the missing close_event, timers for animations are not stopped when closing a figure, leading to an continous stream of errors 'underlying C/C++ object has been deleted' when using ipython.

Gregor Thalhammer

@WeatherGod
Copy link
Member

confirmed using the PyQT4 library

@jdh2358
Copy link
Collaborator

jdh2358 commented Feb 26, 2012

This is addressed in pull request #716

@jdh2358 jdh2358 closed this as completed Mar 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. status: confirmed bug
Projects
None yet
Development

No branches or pull requests

3 participants