def _tabs_add_frame(area, tabs, frame):
    containers = []
    if isinstance(frame, QDockWindow):
        temp_area = frame.dockArea()
        frame.setDockArea(None)
        _merge_dock_bars(area, temp_area)
        containers.extend(iter_containers(temp_area))
    else:
        containers.append(frame)
    for container in containers:
        if container.isWindow():
            container.unfloat()
        container.hideTitleBar()
        tabs.addTab(container, container.icon(), container.title())
        container.show()
    tabs.setCurrentIndex(tabs.count() - 1)
Add a frame to a dock tab widget.
dataset/ETHPy150Open nucleic/enaml/enaml/qt/docking/layout_handling.py/_tabs_add_frame