[Qt-interest] Extracting MDI windows
lbutler3
lbutler3 at comcast.net
Mon Feb 21 17:08:56 CET 2011
Is there a way to extract windows from an MDI area and promote to full windows in the application?
I've tried the following:
void MainWindow::on_actionNew_triggered()
{
m_textwins.append(new QPlainTextEdit(ui->mdiArea));
ui->mdiArea->addSubWindow(m_textwins.last());
m_textwins.last()->show();
}
void MainWindow::on_actionExtractMDI_triggered()
{
QMdiSubWindow *sw = ui->mdiArea->currentSubWindow();
QWidget *win = sw->widget();
win->setParent(this, Qt::Dialog);
win->show();
ui->mdiArea->removeSubWindow(sw);
}
which seems to work until the re-parented QPlainTextWindow is resized, when another window magically appears. This new window seems to be a new application window without the application menus attached.
Any suggestions would be welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110221/7e05bb8a/attachment.html
More information about the Qt-interest-old
mailing list