I have to use Qt show the context of a file, whose size is 70M, but is so slow that it takes several minutes to display.
QFile file("farey.txt");
file.open(QFile::ReadOnly | QFile::Text);
QTextStream ReadFile(&file);
while (!ReadFile.atEnd()) {
QString line = ReadFile.readLine();
ui->Output->append(line);
}
file.close();
Output
is TextEdit
, can anyone give me some help to make it faster?
Can I use Qt to dispatch a default system editor to open the file??