QFile f( "c:\\a.txt");
if(! f.open( QIODevice::ReadWrite | QIODevice::Append | QIODevice::Text))
{
return ;
}
QTextStream out( &f);
out.seek(0); //以QIODevice::Append方式打开文件,文件指针将会自动到文件尾
QString str = out.readLine();
QFile f( "c:\\a.txt");
if(! f.open( QIODevice::ReadWrite | QIODevice::Append | QIODevice::Text))
{
return ;
}
QTextStream out( &f);
out.seek(0); //以QIODevice::Append方式打开文件,文件指针将会自动到文件尾
QString str = out.readLine();