i would like to add a check box in the first column of my QtableIwdget.The end motive is to use it to select/unselect all.I have seen some solutions on the internet but of C++.I would like to do this in python(pyqt5).I have tried this:
chkBoxItem = QTableWidgetItem()
chkBoxItem.setFlags(QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEnabled)
chkBoxItem.setCheckState(QtCore.Qt.Unchecked)
self.table.setHorizontalHeaderItem(0, chkBoxItem)
where table is my QTableWidgetItem.Any help?