hetelek
hetelek

Reputation: 3896

Qt - MDI Child not closing properly

I am trying to close an MDI child (MainWindow is its parent), and I just cannot make it happen. All that is happening, is that all controls are getting removed from the MDI child, but the actually window is not getting removed from the 'mdiArea'.

With my QDialog (the MDI child), I call close. That didn't work, so as well as calling close, I also tried calling:

ui->mdiArea->removeSubWindow(mdiChildDialog);

Again, same results: enter image description here

Upvotes: 3

Views: 1348

Answers (1)

Kiran P
Kiran P

Reputation: 730

try ... this->parentWidget()->close(); to close the child mdi.

Upvotes: 3

Related Questions