#include <qpushbutton.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );
a.setMainWidget( &hello );//设置应用程序的主窗口部件为mainWidget
hello.show();
return a.exec();
}
学习过程中一定要参考数据手册,通过查阅数据手册才知道头函数等等的编写 ,要不会犯很多的错误的