I have a QDataStream:

Qt Code:
  1. QByteArray itemData;
  2. QDataStream dataStream(&itemData, QIODevice::WriteOnly);
  3. dataStream << qstring << intvalue << qpixmap
To copy to clipboard, switch view to plain text mode 

When I want to get the data from the datastream, I don't want all the data at one time, so will this cause the data to come out in the right order?

Qt Code:
  1. QString string1;
  2. int number;
  3. QPixmap pixmap;
  4.  
  5. dataStream >> string1;
  6. .
  7. .
  8. .
  9. dataStream >> number >> pixmap;
To copy to clipboard, switch view to plain text mode