給子視窗設定以下屬性:
setAttribute(Qt::WA_QuitOnClose,false);
參考: https://blog.csdn.net/qq_40754866/article/details/109217799