gpt4 book ai didi

qt - QApplication exec() 创建新的线程/进程?

转载 作者:行者123 更新时间:2023-12-04 00:48:26 35 4
gpt4 key购买 nike

在 QApplication 中,如果我们调用 exec() 那么是否会启动一个新的进程/线程?

最佳答案

不,调用 exec 将:

Enters the main event loop and waits until exit() is called, then returns the value that was set to exit() (which is 0 if exit() is called via quit()).

It is necessary to call this function to start event handling. The main event loop receives events from the window system and dispatches these to the application widgets.

关于qt - QApplication exec() 创建新的线程/进程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3880693/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com