QSerialPort线程
-
@linxisuo said in QSerialPort线程:
使用QSerialPort进行串口通信,在主线程中new一个QSerialPort,并连接好指定串口。在主线程中可以正常通信,传入子线程中就不能使用。
QT大多数的类都不是线程安全的,需要在主线程使用
@linxisuo said in QSerialPort线程:
使用QSerialPort进行串口通信,在主线程中new一个QSerialPort,并连接好指定串口。在主线程中可以正常通信,传入子线程中就不能使用。
QT大多数的类都不是线程安全的,需要在主线程使用