Skip to content
  • 0 Votes
    2 Posts
    5k Views
    VRoninV

    that is wrong way of doing it

    try this:

    QByteArray bytesArray QDataStream out(&bytesArray ,QIODevice::WriteOnly); out << someVector; //saves it //////////////////////////////////////////////////////////////////// QDataStream in(bytesArray); QVector<qreal> otherVector; in >> otherVector; //load

    Please note that qreal is only 99.9% safe when saving to stream and sending it around to programs built with other versions of Qt. use QVector<double> instead