PDA

View Full Version : Modifying file with Qt



afail
14th December 2009, 13:07
Hi,

I need to read certain text from a file, and "remember" the line (nLine) where that text is found in the file. Then on the next line (nLine+1) I need to insert other line of text. I can make copy out of the file and then remove (delete) the "older" and rename the new file, but that is not applicable atm. Is there any way to do "real-time" search/modify for a text in a file?

thanks

high_flyer
14th December 2009, 14:34
Is there any way to do "real-time" search/modify for a text in a file?
Yes there is.
RTFM:
QFile

QTextStream