Thank you!! I changed it to the following and it works!!!!
QFile file("test.txt");
QLabel *testLabel= new QLabel;
QString line;
if (file.open(QIODevice::ReadOnly | QIODevice::Text)){
QTextStream stream(&file);
while (!stream.atEnd()){
line.append(stream.readLine()+"\n");
}
testLabel->setText(line);
}
file.close();