QT串口发送错误

来源:互联网 发布:华为云计算认证培训 编辑:程序博客网 时间:2024/06/06 13:24

调式信息

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是异步的,用定时器解决周期发送问题

0 0
原创粉丝点击