I'm thinking about using QFile and the functions it inherits from QIODevice, seek and write.

I will be receiving data for the file over a network connection, and the data is not guaranteed to come in the proper order, but will come with the offset in the file from which to start writing.

When I first use QFile to create a new file, it is zero bytes. If I then seek to 1024 and write 512 of data, my file should now be 1536 bytes long.

Is this proper usage of seek and write?
Is it defined what will be in the QFile from 0-1024 (i.e. will it reliably 0 those parts)?