QT串口发送错误

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/tt1995cc/article/details/64923616

调式信息

Invalid parameter passed to C runtime function.

Invalid parameter passed to C runtime function.

QObject: Cannot create children for a parent that is in a different thread.

(Parent is QSerialPort(0x17c28fd0), parent's thread is QThread(0x638270), current thread is QThread(0x17bf9bb0)QObject::startTimer: Timers can only be used with threads started with QThread


 原因是我用std::thread创的线程里面又调用了write,timer等线程,write是异步的,用定时器解决周期发送问题

展开阅读全文

没有更多推荐了,返回首页