Hello, I got the following problem.

Qt Code:
  1. class mythread : public QThread
  2. {
  3. public:
  4. mythread();
  5. void run();
  6. public slots:
  7. void processpacket();
  8.  
  9. private:
  10. QTcpServer *tcpServer;
  11. };
To copy to clipboard, switch view to plain text mode 

inside mythread::run I have this

Qt Code:
  1. connect(tcpServer, SIGNAL(newConnection()), this, SLOT(processpacket()));
To copy to clipboard, switch view to plain text mode 

everything compiles and builds but when I run it I get a
Qt Code:
  1. Object::connect: No such slot QThread::processpacket().
To copy to clipboard, switch view to plain text mode 

and if I add Q_OBJECT as follows:

Qt Code:
  1. class mythread : public Qthread
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. mythread();
  7. void run();
  8. public slots:
  9. void processpacket();
  10.  
  11. private:
  12. QTcpServer *tcpServer;
  13. };
To copy to clipboard, switch view to plain text mode 

I get the following error when compiling.:

undefined reference to 'vtable for mythread'

Any help in solving this issues is appreciated. Thanks in advanced