Hi!
I have a Widget working with OpenGL properly and i create a Camera Object and i´m trying connect some signals form my Widget to my Camera Object.
In my main.cpp i have the following code:
CI3DCamera *pCam = new CI3DCamera;
GLWidget widget(0);
widget.resize(640, 480);
QObject::connect(&widget,&GLWidget::initializeGL,pCam,&CI3DCamera::Inicializa);
widget.show();
return a.exec();
But….i receive the following error:
main.cpp
C:\Qt\Qt5.1.0\5.1.0\msvc2012_64_opengl\include\QtOpenGL/qgl.h(364) : error C2440: ‘initializing’ : cannot convert from ‘void’ to ‘int’
Expressions of type void cannot be converted to other types
c:\qt\qt5.1.0\5.1.0\msvc2012_64_opengl\include\qtcore\qobject.h(220) : see reference to function template instantiation ‘void QGLWidget::qt_check_for_QOBJECT_macro<GLWidget>(const T &) const’ being compiled
with
[
T=GLWidget
]
..\INS2\main.cpp(23) : see reference to function template instantiation ‘QMetaObject::Connection QObject::connect<void(__cdecl GLWidget::* )(void),void(__cdecl CI3DCamera::* )(void)>(const GLWidget *,Func1,const CI3DCamera *,Func2,Qt::ConnectionType)’ being compiled
with
[
Func1=void (__cdecl GLWidget::* )(void),
Func2=void (__cdecl CI3DCamera::* )(void)
]
jom: C:\William\PUC-pr\professor\Programa‡Æo Engine\Projeto – Insane Engine\Qt\build-INS2-Desktop_Qt_5_1_0_MSVC2012_OpenGL_64bit-Debug\Makefile.Debug [debug\main.obj] Error 2
jom: C:\William\PUC-pr\professor\Programa‡Æo Engine\Projeto – Insane Engine\Qt\build-INS2-Desktop_Qt_5_1_0_MSVC2012_OpenGL_64bit-Debug\Makefile [debug] Error 2
17:11:05: The process “C:\Qt\Qt5.1.0\Tools\QtCreator\bin\jom.exe” exited with code 2.
Error while building/deploying project INS2 (kit: Desktop Qt 5.1.0 MSVC2012 OpenGL 64bit)
When executing step ‘Make’
17:11:05: Elapsed time: 00:03.
Anyone know why these error happen, and how to solve it?
↧