• 3737阅读
  • 1回复

Qt线程的问题 [复制链接]

上一主题 下一主题
离线tfjy2008
 
只看楼主 倒序阅读 楼主  发表于: 2010-04-22
QThread *thread=new ReadThread(hits,&photo,&email,&sms,&contact,&calender);
    QObject::connect(thread,SIGNAL(finished()),this,SLOT(emitReadEnd()));

为什么运行的时候老是报错?
resultdata.cpp: In constructor 'ResultData::ResultData(lucene::search::Hits*)':
resultdata.cpp:9: error: no matching function for call to 'QObject::connect(QThread*&, const char [12], ResultData* const, const char [15])'
/usr/include/QtCore/qobject.h:209: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)

请高手帮忙解答一下呀,看了论坛上的相似贴子,试了上面的方法还是不行


ReadThread是QThread派生来的类
离线20044454
只看该作者 1楼 发表于: 2010-04-23
QObject::connect(thread,SIGNAL(finished()),this,SLOT(emitReadEnd()));
你这个this指的是谁?如果是thread的话,换成thread
让我做一个Qt的大牛!!!!
快速回复
限100 字节
 
上一个 下一个