from PySide.QtCore import * def test(): w = QObject() @Slot('destroyed()') def on_destroy(*args): print w w.destroyed.connect(on_destroy) test()