看了一个范例的代码。在我的机子里试了一下,但是出现了......has initializer but incomplete type的错误,还望大家给个解答,谢谢。代码如下
#include <QtCore/QCoreApplication>
#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 );
hello.show();
return a.exec();
}
错误信息: error: variable `QApplication a' has initializer but incomplete type