aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-22 17:28:43 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-10-22 19:16:51 -0200
commit77a1654ad587241d3c14bafa2c0deae53e1599ee (patch)
tree1b2dece9fe99a5a956420e03229d0872916a9a05 /tests/QtGui
parent800fb4613cb61dbff33750ec0ab4b18ca3369c6c (diff)
Fix bugs 430, 426, 429, 394, 433.
These bugs are about QApplication instance being destroyed before some QObject. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests/QtGui')
-rw-r--r--tests/QtGui/CMakeLists.txt3
-rw-r--r--tests/QtGui/bug_429.py10
-rw-r--r--tests/QtGui/bug_430.py14
-rw-r--r--tests/QtGui/bug_433.py14
4 files changed, 41 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 21aa7690d..7ff2f7e4b 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -13,6 +13,9 @@ PYSIDE_TEST(bug_367.py)
PYSIDE_TEST(bug_389.py)
PYSIDE_TEST(bug_400.py)
PYSIDE_TEST(bug_416.py)
+PYSIDE_TEST(bug_429.py)
+PYSIDE_TEST(bug_430.py)
+PYSIDE_TEST(bug_433.py)
PYSIDE_TEST(customproxywidget_test.py)
PYSIDE_TEST(deepcopy_test.py)
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
diff --git a/tests/QtGui/bug_429.py b/tests/QtGui/bug_429.py
new file mode 100644
index 000000000..f49d24474
--- /dev/null
+++ b/tests/QtGui/bug_429.py
@@ -0,0 +1,10 @@
+from PySide.QtCore import *
+from PySide.QtGui import *
+import sys
+
+app = QApplication(sys.argv)
+scene = QGraphicsScene()
+label = QLabel("hello world")
+label.show()
+QTimer.singleShot(0, label.close)
+exit(app.exec_())
diff --git a/tests/QtGui/bug_430.py b/tests/QtGui/bug_430.py
new file mode 100644
index 000000000..256c4e203
--- /dev/null
+++ b/tests/QtGui/bug_430.py
@@ -0,0 +1,14 @@
+import sys
+from PySide.QtCore import *
+from PySide.QtGui import *
+
+class ListModel(QAbstractListModel):
+ def rowCount(self, parent = QModelIndex()):
+ return len(self._items)
+
+app = QApplication([])
+model = ListModel()
+v = QListView()
+v.setModel(model)
+QTimer.singleShot(0, v.close)
+app.exec_()
diff --git a/tests/QtGui/bug_433.py b/tests/QtGui/bug_433.py
new file mode 100644
index 000000000..97d897e81
--- /dev/null
+++ b/tests/QtGui/bug_433.py
@@ -0,0 +1,14 @@
+from PySide import QtCore, QtGui
+import sys
+
+class Test(QtGui.QGraphicsView):
+ def __init__(self, parent=None):
+ super(Test, self).__init__(parent)
+ self.s = QtGui.QGraphicsScene()
+ self.setScene(self.s)
+
+a = QtGui.QApplication(sys.argv)
+t = Test()
+t.show()
+QtCore.QTimer.singleShot(0, t.close)
+sys.exit(a.exec_())