summaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_1126.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/bug_1126.py')
-rw-r--r--tests/QtGui/bug_1126.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/QtGui/bug_1126.py b/tests/QtGui/bug_1126.py
new file mode 100644
index 0000000..749fac0
--- /dev/null
+++ b/tests/QtGui/bug_1126.py
@@ -0,0 +1,24 @@
+''' unit test for BUG #1126 '''
+''' see http://bugs.pyside.org/show_bug.cgi?id=1126 '''
+
+from helper import UsesQApplication
+import unittest
+from PySide import QtCore, QtGui
+
+class SignalInstanceDisconnTestCase(UsesQApplication):
+ def testIt(self):
+ w = QtGui.QWidget()
+ w.deleteLater()
+
+ def cb(*args):
+ self.app.quit()
+
+ w.destroyed.connect(cb)
+ self.app.exec_()
+ try:
+ w.destroyed.disconnect(cb)
+ except RuntimeError:
+ pass
+
+if __name__ == "__main__":
+ unittest.main()