QT中|Qt::Tool类型窗口自动退出消息循环问题解决(setQuitOnLastWindowClosed必须设置为false,最后一个窗口不显示的时候,程序会退出消息循环)

为application 设置setQuitOnLastWindowClosed属性,确实为true;

将其显示为false;

退出该应该程序不能调用QDialog的close消息槽,只能调用qApp->exit();

a.setQuitOnLastWindowClosed(false);

https://blog.csdn.net/lanhy999/article/details/8772408

原文地址:https://www.cnblogs.com/findumars/p/9525028.html