Qt项目,为主页上一个关闭按钮加功能,点击之后就关闭软件。那么退出程序的代码怎么写呢? 代码如下: qApp->quit(); 实测有效。 参考: Correct way to quit a Qt program?