Hello all, I have a question that I hope someone can answer.

I am trying to create a window with multiple child MDI windows.

I have a main window, and I add MDI child window to it like this:

(create window and such)
ui->mdiArea->addSubWindow(test, Qt::SubWindow);

This seems to work in that the new window appears as an MDI child window under the primary window.

However, what I would now like to do is have this new MDI child window create another child window like itself. Basically I want to achieve the same effect as if I had run another addSubWindow from the mainwindow, but I need it to run from a button in the newly created MDI child window, and I don't know how I should go about doing this.

I was wondering if there is some way of pointing from the child window to the parent so I could run the "addSubWindow" command again from the parent mainwindow? Or is there some other way.

Hopefully I managed to explain my dilemma properly.

Thanks!