嘿 哥们 你这个最后调试好了么 ? 什么原因呢?
我最近在写Ymodem的协议,参考了你这个,不过发现串口线程结束有点问题。debug时候会提示
QThread: Destroyed while thread is still running。
另外,stop函数里面 停止标志应该为ture吧
修改函数MainWindow::~MainWindow如下之后 线程可正常退出
MainWindow::~MainWindow()
{
SerialThread.Stop();
SerialThread.wait(500);//必须要有这句话,不知何解 给它留出执行的时间?
delete ui;
}