hi
please point the error in the following code
the output isCode:
0 i
i expect the output to be 12345.
Printable View
hi
please point the error in the following code
the output isCode:
0 i
i expect the output to be 12345.
You have no QIODevice set.
You should see a warning in the debug output about this/: "QDataStream: No device".
The data stream must be created with a QIODevice either by passing it in the constructor or via setDevice.
thanks marcel
but even after constructing a QDataStream that operates on QByteArray i am getting the same output
heres the code
the output is
Code:
0 i
It's a stream. Streams don't work like that. You will have to seek the underlying device to beginning, just like in this other thread of yours.
thanks jpn
it worked after using this statement
Code:
stream.device()->seek(0);
how to copy one QDataStream to another QDataStream.