aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/qvariant_test.py
blob: faa755a18f7c42b42dc71893a0bb5eb87728956e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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()