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

Nikita Krupenko krnekit at gmail.com
Tue Mar 8 20:27:52 CET 2016


2016-03-08 19:30 GMT+02:00 Thiago Macieira <thiago.macieira at intel.com>:
> Indeed, but look at how you've combined two or more examples. You have a byte
> array, you create a QDataStream on it, write some data, then you used
> QDataStream to write that byte array to another byte array. You probably
> didn't want that.

It could be useful, if I want to write checksum of the data to the
file. To do this, I can write
some data to the QByteArray wrapped in QDataStream, then calculate
checksum using
qChecksum() (or QCriptographicHash) and then write byte array and
checksum to the file.



More information about the Interest mailing list