Test *t = new Test;ui->mdiArea->addSubWindow(t);ui->mdiArea->setAttribute(Qt::WA_DeleteOnClose);t->show();