qt 线程内 serialport connect readyRead 不触发
qt创建线程如果是创建的定时器timeout槽函数不触发:connect(m_save_gps_timer, SIGNAL(timeout()), this, SLOT(startGPSTimer()), Qt::DirectConnection);创建的串口不触发readyRead:1、检测串口参数是否正确2、创建connect后,检测槽函数是否卸载slots里面3、配置串口参数后,是否打开串口4、如果线程内部是用Sleep,记得添加QEventLoop loop;Q.
原创
2020-06-20 21:13:10 ·
2395 阅读 ·
1 评论