在对话框窗体构造函数加入
SystemDialog::SystemDialog(QWidget *parent) : QDialog(parent), ui(new Ui::SystemDialog){ ui->setupUi(this); Qt::WindowFlags flags=Qt::Dialog; flags |=Qt::WindowMinimizeButtonHint; flags |=Qt::WindowMaximizeButtonHint; flags |=Qt::WindowCloseButtonHint; setWindowFlags(flags); }