安装的版本如下:
qt
creator:qt-opensource-windows-x86-msvc2013_64_opengl-5.3.1
qt library:qt-opensource-windows-x86-mingw482-4.8.6-1
电脑原来安装有vs2010,现在调试都设置好了,单编译
qt5程序不能通过,qt4可以。
安装qt5自带的编译kit,不能用好像:
显示如下:
window.open('http://www.qtcn.org/bbs/attachment/Mon_1408/17_154545_462d2c79f734614.gif?35');" style="max-width:700px;max-height:700px;" onload="if(is_ie6&&this.offsetWidth>700)this.width=700;" >用library4.8编译qt5如下程序时,总是提示:D:\Program\Qt_Library\src\gui\widgets\qabstractbutton.h:127: error: 'void QAbstractButton::clicked(bool)' is protected void clicked(bool checked = false);
D:\CloudFile_CF\Qt5.3,1\untitled\main.cpp:12: error: no matching function for call to 'QObject::connect(QPushButton*, void (QAbstractButton::*)(bool), qMain(int, char**)::__lambda0)'
}); 但是如果将上述代码改成qt4,就可以顺利通过
编译。
#include <QApplication>#include <QPushButton>#include <QDebug>int main(
int argc,
char *argv[]){
QApplication app(argc,
argv);
QPushButton button(
"Quit");
QObject::connect(&button,
&
QPushButton::clicked,
[](
bool)
{
qDebug()
<<
"You clicked me!";
});
button.show();
return app.exec();}