thread->quit(); thread->wait();
时间: 2024-06-01 16:12:25 浏览: 98
结束进程、等待进程结束实例代码
These two lines of code are used to stop and wait for a thread to finish executing.
The first line, `thread->quit()`, is used to stop the execution of the thread. It signals to the thread that it should stop running and exit as soon as possible.
The second line, `thread->wait()`, is used to wait for the thread to finish executing. It blocks the current thread until the other thread has finished running.
Together, these two lines of code ensure that the thread is stopped and has finished running before the program continues execution.
阅读全文