Lets make order in things.
If you need to serialize data IN to a file, just use QDataStream and write the data to the file.
But you have to know how you did that in order to be able to read that data back.
When you read the data back, you can do it exactly as you did when you wrote it, using QDataStream- directly in the correct types, no need to convert.

You can't read binary data from a file, unless you know how it was written.
Well, you can READ it, but converting it to something understandable will be guess work.