[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Construct QVariant from object of user type
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2008-04-24 15:55:14
Message-ID: 200804241655.14146.phil () riverbankcomputing ! com
[Download RAW message or body]
Tonight's PyQt snapshot will have some support for storing a Python object in
a QVariant so the following code works...
from PyQt4.QtCore import QVariant
class Klass(object): pass
k = Klass()
v = QVariant(k)
v1 = QVariant(v)
assert v1.toPyObject() is k
Let me know if more is needed.
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic