in the model's data method:
def data(index, role):
...
if role == QtCore.Qt.CheckStateRole:
return QtCore.Qt.Checked # or UnChecked
Note you can have a checkbox along with the datarole as well.
On Jan 18, 2008, at 12:10 AM, Catriona Johnson wrote:
Hello
How do I implement a checkbox in a QTableView column that
retreives/stores values in a database?
Also, I have one model with columns say abc and I have two QTableViews
of this model that show the columns in different orders - bca and cab.
How do I change the column order in the QTableView?
Thanks
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt