summaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_338.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/bug_338.py')
-rw-r--r--tests/QtGui/bug_338.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/QtGui/bug_338.py b/tests/QtGui/bug_338.py
new file mode 100644
index 00000000..a419fdbe
--- /dev/null
+++ b/tests/QtGui/bug_338.py
@@ -0,0 +1,24 @@
+''' Test bug 338: http://bugs.openbossa.org/show_bug.cgi?id=338'''
+
+import sys
+import unittest
+from PySide import QtCore,QtGui
+
+class DiagramItem(QtGui.QGraphicsPolygonItem):
+ def __init__(self, parent=None, scene=None):
+ super(DiagramItem, self).__init__(parent, scene)
+
+ def itemChange(self, change, value):
+ return value
+
+
+class BugTest(unittest.TestCase):
+ def test(self):
+ app = QtGui.QApplication(sys.argv)
+ scene = QtGui.QGraphicsScene()
+ item = DiagramItem()
+ item2 = DiagramItem()
+ #this cause segfault
+ scene.addItem(item)
+ scene.addItem(item2)
+