The operation is as follows (only the core code is extracted):
QFile file("1.txt"); QTextStream in(&file); QString qstr=in.readLine(); QString qstr=file.readLine();
QTextStream: newline '\n' removed from qstr
QFile: newline '\n' preserved in qstr
The operation is as follows (only the core code is extracted):
QFile file("1.txt"); QTextStream in(&file); QString qstr=in.readLine(); QString qstr=file.readLine();
QTextStream: newline '\n' removed from qstr
QFile: newline '\n' preserved in qstr