#include<qapplication.h>
#include<qpushbutton.h>
int main(int argc,char **argv)
{
QApplication a(argc,argv);
QPushButton hello("Hello world!",0);
hello.resize(100,30);
//a.setMainWidgt(&hello); setMainWidgt是QT3里面的东西,QT4取消了
hello.show();
return a.exec();
}
setMainWidgt是QT3里面的东西,QT4取消了。
慢慢来