买本《C++ GUI Qt 4 编程》看看。
QFile file(filename)
if(!file.open(QIODevice::ReadOnly)) { } //open the text file
QTextStream in(&file); //define a textstream in, after that, use it to read the file
in.readLine();
至于textEdit,自己查相关的类,似乎有setText()函数可以做到。
但中间可能涉及格式转换的问题,有toAscii()和fromAscii()函数可以解决。