diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-02-08 15:52:02 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:53:56 -0300 |
commit | 3c31d96eed51265fd769235d365c27e45b2c66ca (patch) | |
tree | 8970b9dc41f336f057ffcd2c9551262ba8545540 /tests | |
parent | 280d68ca34debebfeb9172420598a15ba576eb7e (diff) |
Fix bug 667 - "Crash on exit"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_667.py | 24 |
2 files changed, 25 insertions, 0 deletions
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_()) |