65,209
社区成员
发帖
与我相关
我的任务
分享Q_OBJECT
The Q_OBJECT macro must appear in the private section of a class definition
that declares its own signals and slots or that uses other services provided
by Qt's meta-object system.#ifndef MYTHREAD_H_
#define MYTHREAD_H_
#include <QtCore>
#include <QThread>
class myThread: public QThread {
Q_OBJECT
public:
myThread();
myThread();
public:
virtual void run();
signals:
void sigTest();
public slots:
void slotTest();
};
#endif