int main(int argc, char *argv[]){ QApplication a(argc, argv); MainWindow w; w.showFullScreen(); return a.exec();}
void MainWindow::ClicM(){ QDialogM dlg(this); dlg.setModal(true); dlg.exec();}
QWidget *wd = new QWidget(this,Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::Dialog); wd->show();
QWidget * widget = new QWidget();widget->setWindowModality(Qt::ApplicationModal);widget->show();