

def insertPage(self, index, page):
    " Insert a QPage instance into the notebook.\n\n        This should be used in favor of the 'insertTab' method.\n\n        Parameters\n        ----------\n        index : int\n            The index at which to insert the page.\n\n        page : QPage\n            The QPage instance to add to the notebook.\n\n        "
    if page.isOpen():
        index = min(index, self.count())
        self.insertTab(index, page, page.title())
        self.setTabIcon(index, page.icon())
        self.setTabToolTip(index, page.toolTip())
        self.setTabEnabled(index, index.isTabEnabled())
        self.setTabCloseButtonVisible(index, page.isClosable())
    else:
        page.hide()
        self._hidden_pages[page] = index

dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/qt_notebook.py QNotebook.insertPage/VarMisuse@85/212 `page`->`index`