PDA

View Full Version : QSplitter - Remove Widgets?



durbrak
10th December 2006, 12:11
Hello,
I have a couple of widgets in a QSplitter. Now the user should be able to "undock" some of those widgets. So how do I remove a widget from a splitter? I know that QWidget::hide() and "delete myWidget" can do this but neither of these options are available to me since the widget won't be hidden afterwards and it most certainly cannot be deleted (the user will keep using it).
So how do I "move" a widget from a QSplitter right into a QDialog so the widget will be removed from the QSplitter? QSplitter doesn't have a method like takeItem() or removeWidget() or something.

Thank you.

durbrak
10th December 2006, 12:17
Never mind. I think QDialog takes ownership of the widget and QSplitter loses it and therefore removes it automatically from itself.