freak
16th June 2006, 19:29
Hello, I got the following problem.
class mythread : public QThread
{
public:
mythread();
void run();
public slots:
void processpacket();
private:
QTcpServer *tcpServer;
};
inside mythread::run I have this
connect(tcpServer, SIGNAL(newConnection()), this, SLOT(processpacket()));
everything compiles and builds but when I run it I get a
Object::connect: No such slot QThread::processpacket().
and if I add Q_OBJECT as follows:
class mythread : public Qthread
{
Q_OBJECT
public:
mythread();
void run();
public slots:
void processpacket();
private:
QTcpServer *tcpServer;
};
I get the following error when compiling.:
undefined reference to 'vtable for mythread'
Any help in solving this issues is appreciated. Thanks in advanced
class mythread : public QThread
{
public:
mythread();
void run();
public slots:
void processpacket();
private:
QTcpServer *tcpServer;
};
inside mythread::run I have this
connect(tcpServer, SIGNAL(newConnection()), this, SLOT(processpacket()));
everything compiles and builds but when I run it I get a
Object::connect: No such slot QThread::processpacket().
and if I add Q_OBJECT as follows:
class mythread : public Qthread
{
Q_OBJECT
public:
mythread();
void run();
public slots:
void processpacket();
private:
QTcpServer *tcpServer;
};
I get the following error when compiling.:
undefined reference to 'vtable for mythread'
Any help in solving this issues is appreciated. Thanks in advanced