invalid use of member (did you forget the '&' ?)

#include "mythread.h"

Mythread::Mythread(QObject *parent) :
QThread(parent)
{
//初始化一般在构造函数中进行赋值
this->num=0;
}
void Mythread::run()
{
while(1)
{
emit wxy(this->num);
this->num++;
usleep (800*1000);
}
}

#ifndef MYTHREAD_H
#define MYTHREAD_H

#include

class Mythread : public QThread
{
Q_OBJECT
public:
explicit Mythread(QObject *parent = 0);

signals:
void wxy(int num); //自定义一个信号,每隔一段时间就发出去给MainWindow

public slots:

protected:

void run();

private:
int num();

};

#endif // MYTHREAD_H

你忘记写 & 取地址了。

connect函数参数里的信号和槽函数必须是指针类型的,我看你信号定义的非指针类型,估计是connect参数没加取地址符号,当然也只是猜测