summaryrefslogtreecommitdiffstats
path: root/tests/QtUiTools/bug_958.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtUiTools/bug_958.py')
-rw-r--r--tests/QtUiTools/bug_958.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/QtUiTools/bug_958.py b/tests/QtUiTools/bug_958.py
new file mode 100644
index 0000000..07ca8b4
--- /dev/null
+++ b/tests/QtUiTools/bug_958.py
@@ -0,0 +1,24 @@
+import unittest
+from PySide import QtGui, QtUiTools
+from helper import adjust_filename
+from helper import TimedQApplication
+
+class Gui_Qt(QtGui.QMainWindow):
+ def __init__(self, parent=None):
+ super(Gui_Qt, self).__init__(parent)
+
+ lLoader = QtUiTools.QUiLoader()
+
+ # this used to cause a segfault because the old inject code used to destroy the parent layout
+ self._cw = lLoader.load(adjust_filename('bug_958.ui', __file__), self)
+
+ self.setCentralWidget(self._cw)
+
+class BugTest(TimedQApplication):
+ def testCase(self):
+ lMain = Gui_Qt()
+ lMain.show()
+ self.app.exec_()
+
+if __name__ == "__main__":
+ unittest.main()