void MainWindow::on_pushButton_clicked()
{
//模态
QDialog dlg(this);
dlg.resize(100,100);
dlg.exec();
qDebug()<<"hello world";
//非模态
QDialog *dlg2=new QDialog(this);
dlg2->resize(200,200);
//釋放記憶體, 當點選關閉的時候
dlg2->setAttribute(Qt::WA_DeleteOnClose);
dlg2->show();
qDebug()<<"hello world2";
}
/// 消息對話框