

def set_layout(self, layout):
    ' Applies a DockLayout to the window.\n        '
    for child in self.control.children():
        if isinstance(child, QtGui.QDockWidget):
            child.hide()
            self.control.removeDockWidget(child)
    for (name, q_dock_area) in AREA_MAP.iteritems():
        sublayout = getattr(layout, name)
        if sublayout:
            self.set_layout_for_area(sublayout, q_dock_area, _toplevel_call=False)
    QtCore.QTimer.singleShot(0, self._reset_fixed_sizes)

dataset/ETHPy150Open enthought/pyface/pyface/ui/qt4/tasks/main_window_layout.py MainWindowLayout.set_layout/original