ファイル読み込み
#include <qapplication.h>
#include <qfile.h>
#include <qtextstream.h>
#include <iostream>
int main( int argc, char *argv[] )
{
QFile f( "file.txt" );
if (f.open(IO_ReadOnly)) {
QTextStream t( &f );
int n = 1;
while (!t.eof()) {
QString str = t.readLine();
std::cout << n++ << ": " << str.local8Bit() << std::endl;
}
f.close();
}
return 0;
}