Hi ppl,

I wrote some code to generate a file with a specific size, in which I later put QByteArrays at specific positions (random-acces).
Qt Code:
  1. ...
  2. file.resize(1024000);
  3. ...
  4. file.seek(12335);
  5. pos = file.pos();
  6. c_size=file.write(ba);
  7. pos2 = file.pos();
  8. file.close();
  9. ...
  10. //QT4.3 / mingw / windows xp
To copy to clipboard, switch view to plain text mode 

the initial QFile::resize works
pos and pos2 indicate the right position

after closing the file it is truncated

Any help/idea is highly appreciated, after having exhausted my resources.
Thanks in advance