[PyQt] QDataStream and QList < T>

Phil Thompson phil at riverbankcomputing.com
Tue Jun 8 14:29:01 BST 2010


On Tue, 11 May 2010 12:58:15 +0200, Fx III <fxiiii at gmail.com> wrote:
> Hi all,
>  I do some mix with Qt/C++ and PyQt, basically I'm trying to store a
> QVariantList into a QDataStream from C++ and try to read it from a
> QDataStream in python. While I am accustomed to write:
> d=QDataStream(..)
> ...
> x=QSomething()
> d >> x
> 
> I can not figure out how tell, neither implicitly nor explicitly, to
> QDataStream to give me a list.
> 
> thanks in advance
> Fx

Tonight's snapshot will have readQVariantList() and writeQVariantList()
added to QDataStream. There are also similar methods for QVariantHash and
QVariantMap.

Apologies for the delay in replying.

Phil


More information about the PyQt mailing list