summaryrefslogtreecommitdiffstats
path: root/tests/QtGui/qvariant_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/qvariant_test.py')
-rw-r--r--tests/QtGui/qvariant_test.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/QtGui/qvariant_test.py b/tests/QtGui/qvariant_test.py
new file mode 100644
index 0000000..faa755a
--- /dev/null
+++ b/tests/QtGui/qvariant_test.py
@@ -0,0 +1,23 @@
+
+import unittest
+from PySide.QtCore import *
+from PySide.QtGui import *
+
+class MyDiagram(QGraphicsScene):
+ pass
+
+class MyItem(QGraphicsRectItem):
+ def itemChange(self, change, value):
+ return value;
+
+class QGraphicsSceneOnQVariantTest(unittest.TestCase):
+ """Test storage ot QGraphicsScene into QVariants"""
+ def testIt(self):
+ app = QApplication([])
+ s = MyDiagram()
+ i = MyItem()
+ s.addItem(i)
+ self.assertEqual(len(s.items()), 1)
+
+if __name__ == '__main__':
+ unittest.main()