aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_589.py
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-07 18:58:40 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:51:45 -0300
commit1caaffba59c8a6897d58e7682842f4b4a86405f2 (patch)
tree78e32b08bd9303c87b163c565701af415e9762fe /tests/QtGui/bug_589.py
parentf4f48519ec2dade5a016b87bc089e90a0caf71a4 (diff)
Created unit test for bug 589.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/QtGui/bug_589.py')
-rw-r--r--tests/QtGui/bug_589.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/QtGui/bug_589.py b/tests/QtGui/bug_589.py
new file mode 100644
index 000000000..0c7cdecbe
--- /dev/null
+++ b/tests/QtGui/bug_589.py
@@ -0,0 +1,19 @@
+# trimmed down diagramscene.py to demonstrate crash in sizeHint()
+
+import sys
+from PySide import QtCore, QtGui
+import unittest
+
+class CustomWidget(QtGui.QGraphicsProxyWidget):
+ def itemChange(self, eventType, value):
+ QtGui.QGraphicsProxyWidget.itemChange(self, eventType, value)
+
+class Bug589(unittest.TestCase):
+ def testCase(self):
+ widget = QtGui.QGraphicsProxyWidget()
+ custom = CustomWidget()
+ custom.setParentItem(widget)
+
+if __name__ == "__main__":
+ app = QtGui.QApplication(sys.argv)
+ unittest.main()