希望大虾帮我解决 提前谢谢了
刚才是接触QT 有些晕头转向了 我在main.cpp写了如下的代码 没有显示出来:
#include"QtGui/QApplication"
#include"QLabel"
#include"QFile"
#include"QTextStream"
intmain(intargc,char*argv[])
{QApplicationa(argc,argv);
QLabel*label=newQLabel();
QFilefile("QT.txt");//同目录下已放置QT.txt文件
file.open(QIODevice::ReadOnly);
QTextStreamstream(&file);
while(stream.atEnd()==0)
{label->setText(stream.readLine());}
label->show();
returna.exec();
}
希望大虾帮我解决 提前谢谢了