I am trying to use slots and signals in a class which inherits QObject class. <br>
When I compile this program I get an error
"/home/aditya/koppermine/src/cpgapiclient.cpp:42: undefined reference
to `vtable for cpgAPIClient'"<br>
<br>
Here's what I am trying to do:<br>
<br>
cpgapiclient.h<br>
===========<br>
<br>
#ifndef CPGAPICLIENT_H<br>
#define CPGAPICLIENT_H<br>
<br>
#include <qstring.h><br>
#include <kio/job.h><br>
<br>
/**<br>
Class to implement the API calls to the remote CPG installation.<br>
<br>
@author Aditya Mooley<br>
*/<br>
class cpgAPIClient : public QObject {<br>
<br>
Q_OBJECT<br>
<br>
public:<br>
//cpgAPIClient(QString, QString);<br>
cpgAPIClient(QString);<br>
~cpgAPIClient();<br>
void setConfigData(const QString &, const QString &, const QString &, const QString &);<br>
void jobResult(KIO::Job *);<br>
void jobData(KIO::Job *, const QByteArray &);<br>
......<br>
}<br>
<br>
cpgapiclient.cpp<br>
=============<br>
cpgAPIClient::cpgAPIClient(QString method)<br>
{ <span style="font-weight: bold;">// Error is displayed for this line</span><br>
APImethod = method;<br>
<br>
connect(this, SIGNAL(conError(const QString &)), this, SLOT(handleConError(const QString &)));<br>
connect(this, SIGNAL(returnReceivedOK()), this, SLOT(receivedOK()));<br>
}<br>
<br>
cpgAPIClient::~cpgAPIClient()<br>
{<span style="font-weight: bold;"><span style="font-weight: bold;"> </span>// Error is displayed for this line</span><br>
}<br>
.............<br>
<br>
Thanks for all your help<br>
<br>
Regards,<br clear="all"><br>-- <br>Aditya Mooley<br>=============================================================<br>PHP Applications for E-Biz: <a href="http://www.sanisoft.com">http://www.sanisoft.com</a><br>Coppermine Picture Gallery:
<a href="http://coppermine.sf.net">http://coppermine.sf.net</a><br>=============================================================