diff options
Diffstat (limited to 'tests/QtCore/bug_953.py')
-rw-r--r-- | tests/QtCore/bug_953.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/QtCore/bug_953.py b/tests/QtCore/bug_953.py new file mode 100644 index 0000000..37ef28e --- /dev/null +++ b/tests/QtCore/bug_953.py @@ -0,0 +1,18 @@ +from PySide.QtCore import * + +class Dispatcher(QObject): + _me = None + + def __init__(self): + super(Dispatcher, self).__init__() + self._me = self + QTimer.singleShot(0, self._finish) + + def _finish(self): + del self._me # It can't crash here! + QTimer.singleShot(10, QCoreApplication.instance().quit) + +if __name__ == '__main__': + app = QCoreApplication([]) + Dispatcher() + app.exec_() |