itas109 / CSerialPort

CSerialPort - lightweight cross-platform serial port library for C++/C/C#/Java/Python/Node.js/Electron
https://blog.csdn.net/itas109/article/details/84282860
Other
730 stars 339 forks source link

readReady.connect not work #23

Closed itas109 closed 6 months ago

itas109 commented 4 years ago

描述bug

m_SerialPort.disconnect_all();
m_SerialPort.readReady.connect(this, &MainWindow::OnReceive);

如果在readReady.connect之前调用disconnect_all,那么异步的接收函数将无法收到数据

If you call disconnect_all before readReady.connect, then the receive function will not receive data

remove disconnect_all is ok

//m_SerialPort.disconnect_all();
m_SerialPort.readReady.connect(this, &MainWindow::OnReceive);

运行环境信息:

itas109 commented 6 months ago

sigslot not support on v4.3.x