我有一个行数有限的QTableWidget
。我想让用户按RETURN插入一行,如果他们在最后一行按RETURN但没有单元格正在编辑(双击鼠标进入编辑模式)。
单元格未被编辑:
代码是这样的,我不知道如何填写当前单元格未被编辑
class MyTable(QTableWidget):
def KeyPressReturn(self, event):
if event.key() == Qt.Key_Return:
if .currentRow() is the last row] and [current cell is not being edited]:
insertRow(last_row_number)
https://stackoverflow.com/questions/38310340
复制