Newline character into textfile using QFile Try out << endl; When you open the file: data.open(QFile::Append | QFile::Text)