PyQt : Checkbox in QTableWidget
问题 I use following code to put a checkbox in the 9th column of my QTableWidget chkBoxItem = QtGui.QTableWidgetItem() chkBoxItem.setFlags(QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEnabled) chkBoxItem.setCheckState(QtCore.Qt.Unchecked) table.setItem(rowNo,9,chkBoxItem) Where table is my QtTableWidget . I need to add the row where the checkbox is clicked to a list.. how on earth do I achieve this? Kind regards, 回答1: One way to do it would be: connect the itemClicked signal of the table to a