Skip to content

no 'close_event' emitted with Qt4Agg backend #711

Closed
@geggo

Description

@geggo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.status: confirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions