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

Sina Dogru sinadooru at gmail.com
Mon Mar 7 15:35:22 CET 2016


Well but, I am writing a QString to QByteArray,

QByteArray bai;
QDataStream out(&bai, QIODevice::WriteOnly);
out << QString("A QString");

And writing an 'int' and QByteArray which a QString written

file.open(QIODevice::WriteOnly);
QDataStream out2(&file); // and module A write those datas to a file.
out2 << bai.size();
out2 << bai;

I might screwed totally? :S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160307/43a3e55f/attachment.html>


More information about the Interest mailing list