cae
27th November 2009, 16:32
Hi, i'm having some trouble introducing signals on a class that heritates from qthread,the class is this one:
class TEjecutor:public QThread {
Q_OBJECT
private:
.
.
.
.
private slots:
.
.
..
and so on
i asign signals on the cpp file
connect(http, SIGNAL(requestFinished(int, bool)),
this, SLOT(httpRequestFinished(int, bool)));
and after when i compile i get this error:
./release\tejecutor.o:tejecutor.cpp:(.text+0x1fd2): undefined reference to `TEjecutor::staticMetaObject'
./release\tejecutor.o:tejecutor.cpp:(.text+0x261c): undefined reference to `TEjecutor::staticMetaObject'
./release\comunicacion.o:comunicacion.cpp:(.text+0x2 3ab): undefined reference to `vtable for TEjecutor'
./release\comunicacion.o:comunicacion.cpp:(.text+0x2 77b): undefined reference to `vtable for TEjecutor'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\Zeus.exe] Error 1
mingw32-make: *** [release] Error 2
Exited with code 2.
Error while building project Zeus
When executing build step 'Make'
If i erase the "Q_Object" it builds perfectly but signals wont work.
What can i do?
class TEjecutor:public QThread {
Q_OBJECT
private:
.
.
.
.
private slots:
.
.
..
and so on
i asign signals on the cpp file
connect(http, SIGNAL(requestFinished(int, bool)),
this, SLOT(httpRequestFinished(int, bool)));
and after when i compile i get this error:
./release\tejecutor.o:tejecutor.cpp:(.text+0x1fd2): undefined reference to `TEjecutor::staticMetaObject'
./release\tejecutor.o:tejecutor.cpp:(.text+0x261c): undefined reference to `TEjecutor::staticMetaObject'
./release\comunicacion.o:comunicacion.cpp:(.text+0x2 3ab): undefined reference to `vtable for TEjecutor'
./release\comunicacion.o:comunicacion.cpp:(.text+0x2 77b): undefined reference to `vtable for TEjecutor'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\Zeus.exe] Error 1
mingw32-make: *** [release] Error 2
Exited with code 2.
Error while building project Zeus
When executing build step 'Make'
If i erase the "Q_Object" it builds perfectly but signals wont work.
What can i do?