#include <QApplication>
#include <QPushButton> 替换为#include<QtGui>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton *button = new QPushButton("Quit");
QObject::connect(button, SIGNAL(clicked()),
&app, SLOT(quit()));
button->show();
return app.exec();
}
本可以运行,但替换之后就不成了,不信试试。不知道高人用的是哪个版本,不知道是不是5.0.1版本有所改变