def mouseDoubleClickEvent(self, event):
if self.currentIndex() != 0:
if event.button() != Qt.LeftButton:
super(TabBarPlus, self).mouseDoubleClickEvent(event)
idx = self.currentIndex()
ok = True
input_dialog = QInputDialog()
newName, ok = QInputDialog.getText(self, 'Mudar nome',
'Novo nome:')
if ok:
self.setTabText(idx, newName)
评论列表
文章目录