#ifndef SIGNAL_H
#define SIGNAL_H
#include <QObject>
class Posix_QextSerialPort;//前向声明第三方串口类,用于定义串口myCom
class Mysig : public QObject
{
Q_OBJECT
public:
Mysig();
~Mysig();
public slots:
void getButtonSig();//定义接收信号的槽
signals:
void sendButtonSig();
private:
Posix_QextSerialPort *myCom;
};
#endif //SIGNAL_H
编译出现主要错误:
invalid use of incomplete type 'struct QObject';
forward declaration of 'struct QObject';
invalid use of incomplete type 'struct QString';
forward declaration of 'struct QString';
return type 'struct QString' is incomplete;