Results 1 to 2 of 2

Thread: Serialization and graphics item

  1. #1
    Join Date
    Sep 2009
    Posts
    49
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Serialization and graphics item

    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.
    Prashant


    qt-sdk-win-opensource-2009.03.1.exe
    Python 2.6.3
    PyQt-Py2.6-gpl-4.6-1
    Win XP, 32 Bit

  2. #2
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Serialization and graphics item

    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

Similar Threads

  1. QDataStream and serialization
    By pdoria in forum Qt Programming
    Replies: 5
    Last Post: 11th November 2009, 10:42
  2. XML Serialization of Qt Objects
    By sasi in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2009, 20:25
  3. Need help with serialization of QMaps
    By fg_psycho in forum Qt Programming
    Replies: 1
    Last Post: 5th May 2009, 18:16
  4. serialization & data integrity
    By darksaga in forum Qt Programming
    Replies: 2
    Last Post: 28th August 2007, 14:04
  5. Serialization
    By donmorr in forum Qt Programming
    Replies: 4
    Last Post: 16th November 2006, 14:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.