# Saving...
props = { }
for p in obj.metaClass().propertyNames( True ):
props[ p ] = obj.property( p )# Loading...
for p, v in props.iteritems():
obj.setProperty( p, v )Of course, this is all of the top of my head and before my coffee has had a chance to kick in.
James
On 5-Apr-05, at 5:39 PM, Eron Lloyd wrote:
Hello again,
Since pickle doesn't allow objects wrapping QObjects, I guess QDataStream is
the next best bet. I haven't found any good examples of it in action, so was
wondering if anyone has any suggestions. Basically I have a class that acts
as a data model, and I'd like to store it's members (both python and
QObjects) as serialized files. I've been spoiled by pickle up 'til now...
Thanks,
Eron
_______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
-- This is not my home; the cats just let me stay here.
_______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
