Oh, very nice, but float in which endianness? Of what length? QDataStream needs to take that all into consideration thus it stores additional information in the stream and expects that information to be present when reading the stream.
What for if std::fstream already does that? If you keep an unportable data in a file, you need an unportable solution to it. QDataStream is not one. Use QIODevice::read() and cast or convert the output into the format you know is suitable.Does not exist a form in Qt to catch these values of file?
Qt is not a panaceum. It is meant to provide portable solutions and yours is not portable thus it is not supported by Qt.
Bookmarks