var QVariant test1 test2 var var toPyObject type var type dict var tes

1
2
3
4
5
6
7
8
9
>>> var = QVariant({'test1' : 1, 'test2' : 2})
>>> var = var.toPyObject()
>>> type(var)
<type 'dict'>
>>> var['test1']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'test1'
>>>