qthread にシグナルを追加しようとしていますが、いくつかのエラーが発生します。
エラー: 「vtable for RFDongleCommunication」への未定義の参照
エラー: 「RFDongleCommunication::newLogger(unsigned char, unsigned char)」への未定義の参照
これは私のヘッダーファイルです:
#ifndef RFDONGLECOMMUNICATION_H
#define RFDONGLECOMMUNICATION_H
#include <QThread>
#include "qextserialport.h"
#include <QtGui>
class RFDongleCommunication: public QThread
{
Q_OBJECT
public:
explicit RFDongleCommunication(QextSerialPort * port);
QextSerialPort * rfport;
QByteArray data;
signals:
void newLogger(uchar,uchar);
private:
void run();
};
#endif // RFDONGLECOMMUNICATION_H
そしてcppファイル
#include "rfdonglecommunication.h"
#include "QDebug"
RFDongleCommunication::RFDongleCommunication(QextSerialPort * port)
{
rfport=port;
}
void RFDongleCommunication::run()
{
while(!(rfport->bytesAvailable()));
data = rfport->readAll();
uchar id = data[1];
uchar type = data[2];
emit newLogger(id,type);
}
誰かが私が間違っていることを見ていますか?