void MyDialog::MyDialog() { // Qt::Widget, Qt::Window or Qt::Dialog. setWindowFlags(Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint); }