Results 1 to 5 of 5

Thread: Serialization

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Feb 2006
    Posts
    26
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows
    Thanked 2 Times in 1 Post

    Default Re: Serialization

    Overloaded operators << and >> for other data types are defined in the data class itself, not in the QDataStream class. This is better for the extensibility of the QDataStream class (in other words, you don't need to modify the QDataStream class itself to extend its supported types).

    That means you have to look in each class you want to serialize if the functions like that exist :

    QDataStream & operator<< ( QDataStream & stream, const QString & string )
    QDataStream & operator>> ( QDataStream & stream, QString & string )

    EDIT: In addition, this url shows you all data serializable with QDataStream, given the Qt framework.

    For you own needs, you will probably define you own overloaded operators for you specific data class.

  2. The following 2 users say thank you to nouknouk for this useful post:

    donmorr (17th November 2006), gfunk (16th November 2006)

Similar Threads

  1. [Qt4] qdatastream/qstring serialization
    By fabo in forum Qt Programming
    Replies: 4
    Last Post: 19th April 2006, 19:31

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
  •  
Qt is a trademark of The Qt Company.