Hi, i'm having some trouble introducing signals on a class that heritates from qthread,the class is this one:
Q_OBJECT
private:
.
.
.
.
private slots:
.
.
..
and so on
class TEjecutor:public QThread {
Q_OBJECT
private:
.
.
.
.
private slots:
.
.
..
and so on
To copy to clipboard, switch view to plain text mode
i asign signals on the cpp file
connect(http, SIGNAL(requestFinished(int, bool)),
this, SLOT(httpRequestFinished(int, bool)));
connect(http, SIGNAL(requestFinished(int, bool)),
this, SLOT(httpRequestFinished(int, bool)));
To copy to clipboard, switch view to plain text mode
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+0x23ab): undefined reference to `vtable for TEjecutor'
./release\comunicacion.o:comunicacion.cpp:(.text+0x277b): 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'
./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+0x23ab): undefined reference to `vtable for TEjecutor'
./release\comunicacion.o:comunicacion.cpp:(.text+0x277b): 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'
To copy to clipboard, switch view to plain text mode
If i erase the "Q_Object" it builds perfectly but signals wont work.
What can i do?
Bookmarks