def rename_tab(self, index=None): """ Prompt user to rename a tab :param index: integer. Index of tab to edit. Defaults to current index """ index = index or self.currentIndex() label = get_text("New Tab Label") if not label: return self.setTabText(index, label)
def choose_rename_tab(self, index=None): """ Prompt user to rename a tab Parameters ---------- index : int Index of tab to edit. Defaults to current index """ index = index or self.currentIndex() label = get_text("New Tab Label") if not label: return self.rename_tab(index, label)