QT 发送signal但是无法到达SLOT函数,修改下程序就可以,望大牛解答为什么?
main函数部分代码如下:
Message_Handler * pMsgHandler = new Message_Handler();
QThread *pMsgHandlerThread = new QThread;
pMsgHandler->moveToThread(pMsgHandlerThread);
QObject::connect(pMsgHandlerThread, SIGNAL(started()), pMsgHandler, SLOT(handleMessage()));
pMsgHandlerThread->start(QThread::NormalPriority);
QObject::connect(pServerStatusGui, SIGNAL(signalSendClientSetupInitNetMsg()),pMsgHandler, SLOT(sendClientSetupInitNetMsg()),Qt::AutoConnection);
如果我发送signalSendClientSetupInitNetMsg(),那么QT无法找到slot sendClientSetupInitNetMsg()
如果程序修改成
Message_Handler * pMsgHandler = new Message_Handler();
//QThread *pMsgHandlerThread = new QThread;
// pMsgHandler->moveToThread(pMsgHandlerThread);
// QObject::connect(pMsgHandlerThread, SIGNAL(started()), pMsgHandler, SLOT(handleMessage()));
// pMsgHandlerThread->start(QThread::NormalPriority);
QObject::connect(pServerStatusGui, SIGNAL(signalSendClientSetupInitNetMsg()),pMsgHandler, SLOT(sendClientSetupInitNetMsg()),Qt::AutoConnection);
如果我发送signalSendClientSetupInitNetMsg(),那么QT能够找到slot sendClientSetupInitNetMsg()
想问下这个是怎么回事啊?
Message_Handler * pMsgHandler = new Message_Handler();
QThread *pMsgHandlerThread = new QThread;
pMsgHandler->moveToThread(pMsgHandlerThread);
QObject::connect(pMsgHandlerThread, SIGNAL(started()), pMsgHandler, SLOT(handleMessage()));
pMsgHandlerThread->start(QThread::NormalPriority);
QObject::connect(pServerStatusGui, SIGNAL(signalSendClientSetupInitNetMsg()),pMsgHandler, SLOT(sendClientSetupInitNetMsg()),Qt::AutoConnection);
如果我发送signalSendClientSetupInitNetMsg(),那么QT无法找到slot sendClientSetupInitNetMsg()
如果程序修改成
Message_Handler * pMsgHandler = new Message_Handler();
//QThread *pMsgHandlerThread = new QThread;
// pMsgHandler->moveToThread(pMsgHandlerThread);
// QObject::connect(pMsgHandlerThread, SIGNAL(started()), pMsgHandler, SLOT(handleMessage()));
// pMsgHandlerThread->start(QThread::NormalPriority);
QObject::connect(pServerStatusGui, SIGNAL(signalSendClientSetupInitNetMsg()),pMsgHandler, SLOT(sendClientSetupInitNetMsg()),Qt::AutoConnection);
如果我发送signalSendClientSetupInitNetMsg(),那么QT能够找到slot sendClientSetupInitNetMsg()
想问下这个是怎么回事啊?
...全文
相关推荐
Qt及Qt Quick开发实战精解
Qt及Qt Quick开发实战精解,霍亚飞编著。可作为QT Quick的入门教材
正交拉丁超立方(OLHC)分组与实验设计(DOE)评估的优化Python实现.rar
正交拉丁超立方(OLHC)分组与实验设计(DOE)评估的优化Python实现.rar
Java微服务如何拆解审计日志查询服务
标题:Java微服务如何拆解审计日志查询服务 内容概要:围绕缓存策略、任务调度、回压控制和审计追踪,拆解Java微服务如何拆解审计日志查询服务的实现细节。 xdronline.com xdrea.com 9g.xinmei6.com xinghaohuanbao.com m.xiker66.com
港股十档行情tick数据涵盖逐笔成交与委托,记录每笔买卖价格、成交量及挂单明细 逐笔数据包含成交时间、价格、股数、成交方向,委托数据展示买一至买十、卖一至卖十的价格与数量
港股十档行情tick数据涵盖逐笔成交与委托,记录每笔买卖价格、成交量及挂单明细。逐笔数据包含成交时间、价格、股数、成交方向,委托数据展示买一至买十、卖一至卖十的价格与数量。分钟数据汇总每分钟开盘价、最高价、最低价、收盘价、成交量及成交额。历史行情覆盖近十五年,字段清晰完整,便于回溯分析。 数据源:CMES金融数据库
MO-372A_PQFP-F6_I1p27-R3p8x4p48Z1p1-N5p5C1p24.stp
MO-372A_PQFP-F6_I1p27-R3p8x4p48Z1p1-N5p5C1p24.stp


