[Qt-interest] does QT have something like Python's cPickle or that can read that.

Kaleb Pederson kaleb.pederson at gmail.com
Wed Feb 18 22:12:30 CET 2009


On Wed, Feb 18, 2009 at 1:02 PM, Knapp <magick.crow at gmail.com> wrote:
> I need to replace this line of Python with something in QT or just
> plain C++ but I want to keep my platform flexibility. I can go back
> and do it the hard way with plain text reading but just wanted to ask
> first. The file is a bunch of strings that are compressed. I do have
> the original text files, if I need them.
>
> thrust_Damage = "filler"; // cPickle.load(open('Thrust.p','rb'));

Take a look at QDataStream.  It can serialize most Qt objects, so if
you're object consists of mostly Qt objects, you could likely write a
simple function (say operator<<()) that will allow you to serialize
it.

QDataStream is also really handy for implementing cut/copy/paste as well....

Regards.

--Kaleb



More information about the Qt-interest-old mailing list