PDA

View Full Version : how to write in text file



prabhatjha
16th March 2015, 05:34
I have four lineEdit and one pushbutton .
on each buttonclick new data will be updated in lineEdit and on each buttonclick i want to add data in text file every time.
plzz suggest me how i can do this.

jefftee
16th March 2015, 05:41
Use QFile::open(QIODevice::Text|QIODevice::Append) to open a file so that you append data to the end of the file, then use QTextStream or write to the file directly using QFile::write.