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.




Reply With Quote
Bookmarks