Re: QDataStream >> QString
If you write to a descriptor using QDataStream, you can safely read from it using a QDataStream. The problem is only if you write using a QDataStream and read without using it or vice versa.
Re: QDataStream >> QString
The idea behind QDataStream is that you can serialize anything with it one time and later deserialize it . So what you put in the stream you have to read back in the same order: No extra counter needed.
The correct receiver for your sender would be:
Code:
stream >> some_QString;
stream >> some_quint;
What is not guaranteed is how your data is stored - only that you get later an exact copy back.