[PyKDE] pickle.dump and QString

Eron Lloyd eronlloyd at gmail.com
Fri Aug 5 14:16:18 BST 2005


On Friday 05 August 2005 9:12 am, Maurizio Colucci wrote:
> Hello,
>
> pickle.dump seems to fail with classes which have QStrings as members.
> Any idea how to deal with that?
>
> PS: I'd rather avoid, if possible, converting qstrings to python
> strings with str(), since an automatic transcoding seems to happen,
> which I can't seem to reverse, and which breaks the appearance of
> nonlatin characters (such as umlauts).

What about unicode()?

As far as I know, pickle can't be used on any Qt classes. You could look at 
QDataStream to serialize some Qt types.

Eron




More information about the PyQt mailing list