PDA

View Full Version : Reading from QDataStream question



di_zou
22nd October 2009, 18:31
I have a QDataStream:


QByteArray itemData;
QDataStream dataStream(&itemData, QIODevice::WriteOnly);
dataStream << qstring << intvalue << qpixmap

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?


QString string1;
int number;
QPixmap pixmap;

dataStream >> string1;
.
.
.
dataStream >> number >> pixmap;

wysota
23rd October 2009, 00:05
Could you maybe rephrase your question? What is the problem here exactly?