16,213
社区成员
发帖
与我相关
我的任务
分享
if (!m_pHttp)
m_pHttp = new QHttp();
connect(m_pHttp,
SIGNAL(done(bool)),
this,
SLOT(GetResponse(bool)));
class UserThread : public QThread //用户定义的线程类
{
public:
UserThread(QObject *r, QMutex *m, QWaitCondition *c);
QObject *receiver;
}
void UserThread::run() //线程类启动函数,在该函数中创建了一个用户自定义事件
{UserEvent *re = new UserEvent(resultstring);
QThread::postEvent(receiver, re);
}
if (!m_pHttp)
m_pHttp = new QHttp();
connect(m_pHttp,
SIGNAL(done(bool)),
this,
SLOT(GetResponse(bool)));