summaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_338.py
blob: a419fdbe326f029a8ddfad4cbfcb0511b0d7a456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)