summaryrefslogtreecommitdiffstats
path: root/tests/QtUiTools/bug_909.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtUiTools/bug_909.py')
-rw-r--r--tests/QtUiTools/bug_909.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/QtUiTools/bug_909.py b/tests/QtUiTools/bug_909.py
new file mode 100644
index 0000000..18df7b3
--- /dev/null
+++ b/tests/QtUiTools/bug_909.py
@@ -0,0 +1,24 @@
+import sys
+import unittest
+
+from PySide.QtCore import QFile
+from PySide.QtGui import QTabWidget
+from PySide.QtUiTools import QUiLoader
+
+from helper import UsesQApplication
+from helper import adjust_filename
+
+class TestDestruction(UsesQApplication):
+ def testBug909(self):
+ fileName = QFile(adjust_filename('bug_909.ui', __file__))
+ loader = QUiLoader()
+ main_win = loader.load(fileName)
+ self.assertEqual(sys.getrefcount(main_win), 2)
+ fileName.close()
+
+ tw = QTabWidget(main_win)
+ main_win.setCentralWidget(tw)
+ main_win.show()
+
+if __name__ == '__main__':
+ unittest.main()