我的一个程序是通过QThread的一个子类Thread发送一个信号display()给主界面进程执行printMessage()函数,
mythread=new Thread();connect(mythread,SIGNAL(display()),this,SLOT(printMessage()));
结果编译不通过,提示如下:
pr9000.cpp: In constructor 'PR9000::PR9000(QWidget*, const char*, uint)':
pr9000.cpp:89: error: no matching function for call to 'PR9000::connect(Thread*&, const char [11], PR9000* const, const char [16])'
/opt/FriendlyARM/Qte/arm-qtopia-2.2.0/qt2/include/qobject.h:110: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*)
/opt/FriendlyARM/Qte/arm-qtopia-2.2.0/qt2/include/qobject.h:209: note: bool QObject::connect(const QObject*, const char*, const char*) const
make: *** [pr9000.o] 错误 1
这是什么原因?谢谢