When reading, the end-of-line terminators are translated to '\n'. When writing, the end-of-line terminators are translated to the local encoding, for example '\r\n' for Win32.
使用QTextStream向txt文件输出换行时,需要使用QIODevice::Text标志。官方文档对QIODevice::Text的解释:When reading, the end-of-line terminators are translated to '\n'. When writing, the end-of-line terminators are translate