当前位置: 技术问答>linux和unix
qt第一个程序出现问题
来源: 互联网 发布时间:2016-07-07
本文导语: #include #include int main(int argc,char *argv[]) { QApplication app(argc,argv); QPushButton b("Hello World!"); b.show(); QObject::connect(&b,SIGNAL(clicked()),&app,SLOT(quit())); return app.exec(); } hello.cpp:6: 错误:对‘QPushButton::QPushBu...
#include
#include
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QPushButton b("Hello World!");
b.show();
QObject::connect(&b,SIGNAL(clicked()),&app,SLOT(quit()));
return app.exec();
}
hello.cpp:6: 错误:对‘QPushButton::QPushButton(const char [13])’的调用没有匹配的函数
/usr/lib/qt-3.3/include/qpushbutton.h:141: 附注:备选为: QPushButton::QPushButton(const QPushButton&)
/usr/lib/qt-3.3/include/qpushbutton.h:70: 附注: QPushButton::QPushButton(const QIconSet&, const QString&, QWidget*, const char*)
/usr/lib/qt-3.3/include/qpushbutton.h:68: 附注: QPushButton::QPushButton(const QString&, QWidget*, const char*)
/usr/lib/qt-3.3/include/qpushbutton.h:67: 附注: QPushButton::QPushButton(QWidget*, const char*)
make: *** [.obj/hello.o] 错误 1
求解
|
#include
#include
这样改可以吗?
#include
这样改可以吗?
|
不同的版本同一个函数定义还不一样么?
|
搞定了?
接分~
接分~