def doneEditing(self):
# This block signals needs to happen first otherwise I have lose focus
# problems again when there are no rows
self.line.blockSignals(True)
self.line.setHidden(True)
newname = str(self.line.text())
self.model().setHeaderData(self.sectionedit, Qt.Orientation.Vertical, newname)
self.line.setText('')
self.setCurrentIndex(QtCore.QModelIndex())
评论列表
文章目录