Dear fabo,
The number of bytes that goes into the byte array depends on what you put in it:
in test1 you put a string of 8 characters in it and QDataStream prepends this with an integer (=4bytes) to remember the size of the data ==> 12 bytes
in test2 QDataStream writes the null terminated ('\0' == extra byte) string to the bytearray again prepended with an integer telling the size of this data. ==> 13 bytes
in test3 QDataStream seems to need 20bytes to store a QString object
hope this helps,
Greetz,
RaKKeR
Bookmarks