[Interest] reading from and writing to a file with QDataStream

Sina Dogru sinadooru at gmail.com
Tue Mar 8 08:05:50 CET 2016


Thank you for writing Thiago,


> The problem is here. You've removed the bug from the sample source. So we
> can't help you.


Well I might made a mistake, I am kind of a amatuer programmer but on the
real code, the problem is also same. I mean after I read stream to string,
string is empty.
But for now it is working. Like you and others pointed, the problem was I
was reading different size of bytes.

>
> Most likely module A is overwriting the byte array, instead of appending to
> it.
>

I approach to QByteArray like std::string.

>
> Did you really mean to write a datastream that contains a datastream
> inside?
> Did you mean to nest one inside the other?
>

Ah can you be more specific please? Because I have just cheated from qt-docs
<http://doc.qt.io/qt-5/qdatastream.html#details> writing to and reading
from a file if you are talking about constructing a QDataStream from a
QFile.

Cheers,
Sina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160308/26898fbe/attachment.html>


More information about the Interest mailing list