aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_667.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/bug_667.py')
-rw-r--r--tests/QtGui/bug_667.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/QtGui/bug_667.py b/tests/QtGui/bug_667.py
new file mode 100644
index 000000000..40c8d64a3
--- /dev/null
+++ b/tests/QtGui/bug_667.py
@@ -0,0 +1,24 @@
+from PySide.QtCore import *
+from PySide.QtGui import *
+
+class Ball(QGraphicsEllipseItem):
+ def __init__(self, d, parent=None):
+ super(Ball, self).__init__(0, 0, d, d, parent)
+ self.vel = QPointF(0,0) #commenting this out prevents the crash
+
+class Foo(QGraphicsView):
+ def __init__(self):
+ super(Foo, self).__init__(None)
+ self.scene = QGraphicsScene(self.rect())
+ self.setScene(self.scene)
+ self.scene.addItem(Ball(10))
+
+
+if __name__ == "__main__":
+ import sys
+ app = QApplication(sys.argv)
+ w = Foo()
+ w.show()
+ w.raise_()
+ QTimer.singleShot(0, w.close)
+ sys.exit(app.exec_())