PDA

View Full Version : Serialization and graphics item



prashant
12th November 2009, 11:31
Related to PyQt 4.6.1

I need to save my custom QGraphicsItem instances on disk. I tried using pickle,cpickle,shelve,marshal etc, but nothing seems to work and application is getting crashed while dumping the data.
Some of the items are simple one while other are complex ones where other items are parented and sort of.
Although I would prefer to use custom xml format to write data on disk but right now anything faster would do the job.

sanjayshelke
12th November 2009, 12:03
I guess if you need to save you custom QGraphicsItem to the physical disk, you may have requirement of restoring it back.

In such cases you may have to develope your own format for serializing as well as deserializing the custom QGraphicsItem.

The format can be xml format or binary format.

regards,
~Sanajay