diff options
Diffstat (limited to 'tools/designer/src/lib/shared/morphmenu.cpp')
-rw-r--r-- | tools/designer/src/lib/shared/morphmenu.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/designer/src/lib/shared/morphmenu.cpp b/tools/designer/src/lib/shared/morphmenu.cpp index 073321b..67be71e 100644 --- a/tools/designer/src/lib/shared/morphmenu.cpp +++ b/tools/designer/src/lib/shared/morphmenu.cpp @@ -62,6 +62,7 @@ #include <QtGui/QApplication> #include <QtGui/QLayout> #include <QtGui/QUndoStack> +#include <QtGui/QSplitter> #include <QtGui/QFrame> #include <QtGui/QGroupBox> @@ -457,6 +458,13 @@ void MorphWidgetCommand::morph(QWidget *before, QWidget *after) Q_ASSERT(lh); lh->replaceWidget(containingLayout, before, after); delete lh; + } else if (QSplitter *splitter = qobject_cast<QSplitter *>(parent)) { + const int index = splitter->indexOf(before); + before->hide(); + before->setParent(0); + splitter->insertWidget(index, after); + after->setParent(parent); + after->setGeometry(oldGeom); } else { before->hide(); before->setParent(0); |