Hi,
How can I do the serialization of a QString?
I have executed the example code that is in the QDataStream class, but it does not do the serialization of the QString, only of the integer, the output in the file is the following: the answer *
And the code is as follows:

QFile file("/Users/eduardo/My Cloud/Programas/readFileLineToLine12/dat1.txt");
if (!file.open(QIODevice::WriteOnly/* | QIODevice::Append*/)) {
QMessageBox::information(this, tr("Unable to open file"), file.errorString());
return;
}
QDataStream out(&file);
out.setVersion(QDataStream::Qt_5_4);
out << QString("the answer is");
out << (qint32)42;
file.flush();
file.close();

Thanks a lot