From 3c31d96eed51265fd769235d365c27e45b2c66ca Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Tue, 8 Feb 2011 15:52:02 -0200 Subject: Fix bug 667 - "Crash on exit" --- PySide/QtGui/typesystem_gui_common.xml | 17 ++++++++++++++++- tests/QtGui/CMakeLists.txt | 1 + tests/QtGui/bug_667.py | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 tests/QtGui/bug_667.py diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index 2227103a5..a0e675af0 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -2830,9 +2830,24 @@ - + + + + + + + + + + + + + + + + diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 7724377a2..dd24a86d2 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -36,6 +36,7 @@ PYSIDE_TEST(bug_652.py) PYSIDE_TEST(bug_653.py) PYSIDE_TEST(bug_660.py) PYSIDE_TEST(bug_662.py) +PYSIDE_TEST(bug_667.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_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_()) -- cgit v1.2.3