Here goes my Code first.
QByteArray buff;
QDataStream stream(&buff, QIODevice::ReadWrite);
stream.setVersion(QDataStream::Qt_4_7);
stream << 5;
stream << 6;
qDebug() << buff;
int x;
int y;
stream >> x >> y;
qDebug() << x << y;
I expect x be 5 and y be 6. But its showing 0 0 Here is the output
"
0 0