Hello,

I am trying to use this code and I am getting the error 'undefined reference to `vtable for ClientHandler', on the lines indicated with << on this line
It's supposed to become a simple console program to update my dns subscriptions on namecheap and dyndns.

Qt Code:
  1. #include <QDebug>
  2. #include <QNetworkAccessManager>
  3. #include <QUrl>
  4. #include <QNetworkRequest>
  5. #include <QObject>
  6.  
  7. class ClientHandler : public QObject
  8. { // << on this line
  9. Q_OBJECT
  10. QNetworkAccessManager *manager;
  11. private slots:
  12. void replyFinished(QNetworkReply *);
  13. public:
  14. void CheckSite(void);
  15. ~ClientHandler();
  16. };
  17.  
  18. void ClientHandler::replyFinished(QNetworkReply *reply) { qDebug() << "DONE"; }
  19. ClientHandler::~ClientHandler() {} // <<-- on this line
  20.  
  21. void ClientHandler::CheckSite(void)
  22. {
  23. QUrl qrl("http://checkip.dyndns.org");
  24. manager = new QNetworkAccessManager(this);
  25. connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
  26. manager->get(QNetworkRequest(qrl));
  27. }
To copy to clipboard, switch view to plain text mode 

Thanks for help!