QFile class start of stram
-
14-03-2021 - |
题
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.
解决方案
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.
不隶属于 StackOverflow