My problem was that I was saving the whole object in my file. When we use the operator >>
in a stream, the Qt serializes the whole object and sends it. If you want write only the bytes of your file, or whatever you want, you need to use writeRawData
or the write methods passing the char * for the bytes.
:)