[PyQt] Re: PyQt4 question related to QVariant
Phil Thompson
phil at riverbankcomputing.com
Sat Jul 4 21:35:12 BST 2009
On Sat, 4 Jul 2009 19:18:29 +0200, Detlev Offenbach
<detlev at die-offenbachs.de> wrote:
> Hi,
>
> I would like to store a QModelIndex instance in a QVariant in one place
of
> my
> code and retrieve this back out of the variant somewhere else.
>
> How do I do that. PyQt4.QtCore.QVariant seems to be missing the
setValue()
> method.
...because it is template based. Just pass it to QVariant() and retrieve it
with toPyObject().
Phil
More information about the PyQt
mailing list