I would like to convert QVector to QByteArray. I am using something like this:
QByteArray bytesArray
QDataStream out(&bytesArray ,QIODevice::WriteOnly);
out << someVector;
bytesArray = qCompress(bytesArray, 5);
And to read it:
bytesArray = qUncompress(bytesArray)
QDataStream in(bytesArray);
QVector<qreal> otherVector;
in >> otherVector;
But i have a problem. I saved number like 1.23124121242135, and after reading i got 1.23124. How can i store and read full number?