Hi,
I am trying to have a QTableView of checkboxes, so I can use them for row
selections... I have managed to do that, now I want the header Itself to be
checkbox so I can check/Uncheck All. I have been looking for days, but
couldn't get to do it.
I tried to use setHeaderData to the model, but couldn't do it.
<-- snip -->
item = QtGui.QTableWidgetItem("Check");
item.setFlags(
QtCore.Qt.ItemIsUserCheckable|QtCore.Qt.ItemIsEnabled )
item.setCheckState(QtCore.Qt.Unchecked)
model.setHeaderData(0, QtCore.Qt.Horizontal, item,
QtCore.Qt.CheckStateRole)
</-- snap -->
I am using QSqlRelationalModel for the table. Any help is much appreciated.
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt