给子窗口设置以下属性:
setAttribute(Qt::WA_QuitOnClose,false);
参考: https://blog.csdn.net/qq_40754866/article/details/109217799