#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.setMainWidget(&hello);//error
hello.show();
return a.exec();
}
直接在.cpp中写入,怎么编译可以通过,不能运行啊?系统自带的hello例子却可以运行
[ 此贴被XChinux在2008-07-18 13:32重新编辑 ]