QFilefile("xxxx.txt");if(file.open(QIODevice::ReadOnly)){QTextStreamread(&file);while(!read.atEnd()){tetedit->Append(read.readLine());}}dbInfo.close();
QTextStream具体用法查帮助文档
QTextStream readLine方法
fstream就可以实现了