2

I'm using Qt for reading binary file. I read file with QFile object, but sometimes I need to go back at begining of the file and read file again, but I don't know how to do that.

MrD
  • 2,423
  • 3
  • 33
  • 57

1 Answers1

2

You can use the seek function on your file :

file.seek(0);

If you are reading the file using a QTextStream you should use the seek function on the stream.

pnezis
  • 12,023
  • 2
  • 38
  • 38