Hi all

I am trying to make an MDI application, I am able to add MDI child windows to my main window, the problem is that every time I create a new MDI child some memory is allocated and this memory is not freed after I close the MDI child.

This is what I have done

Created a new app, added a new QMdiArea object to the QMainWindow through the designer, then whenever I need to create a new MDI child, I call this:

Qt Code:
  1. void MainWindow::on_addMdiChildAction_triggered()
  2. {
  3. MdiDialog* dialog = new MdiDialog(this);
  4. this->ui->mdiArea->addSubWindow(dialog);
  5. dialog->show();
  6. }
To copy to clipboard, switch view to plain text mode 

Am I missing anything?

Thanks in advance.