Terminate the child thread properly
Optimize write logic
This commit is contained in:
wh201906
2022-03-21 15:45:31 +08:00
parent ff3a43a4a6
commit 9dcd291894
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -30,7 +30,9 @@ MainWindow::MainWindow(QWidget *parent):
settings->setIniCodec("UTF-8");
pm3Thread = new QThread(this);
connect(QApplication::instance(), &QApplication::aboutToQuit, pm3Thread, &QThread::quit);
pm3 = new PM3Process(pm3Thread);
connect(pm3Thread, &QThread::finished, pm3, &PM3Process::deleteLater);
pm3Thread->start();
pm3state = false;
clientWorkingDir = new QDir;