PDA

View Full Version : Multiple File Data accessing



hasnatzaidi
28th October 2009, 14:41
hi all, can i fetch a simple text file data into another text file. In other words just copy one file data into another file.please tell me the command of it.
I am using already QFile function for string manipulation.
thanks

jano_alex_es
28th October 2009, 16:34
From QtAssistant:

The file is opened with open(), closed with close(), and flushed with flush(). Data is usually read and written using QDataStream or QTextStream, but you can also call the QIODevice-inherited functions read(), readLine(), readAll(), write(). QFile also inherits getChar(), putChar(), and ungetChar(), which work one character at a time.

So, read on file and write all the data at the end of the other.