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:
void MainWindow::on_addMdiChildAction_triggered()
{
MdiDialog* dialog = new MdiDialog(this);
this->ui->mdiArea->addSubWindow(dialog);
dialog->show();
}
void MainWindow::on_addMdiChildAction_triggered()
{
MdiDialog* dialog = new MdiDialog(this);
this->ui->mdiArea->addSubWindow(dialog);
dialog->show();
}
To copy to clipboard, switch view to plain text mode
Am I missing anything?
Thanks in advance.
Bookmarks