QDialog QWidget 默认show()都是非模态如果需要模态显示,QDialog ==> setModal(true); show(); exec();QWidget ==> setWindowModality(Qt::ApplicationModal); show(); exec();