I have a QTableView that needs the first column to display a QCheckBox. Since the only thing in the QTableView which is editable is the QCheckBox, the user should be able to change the state of one of the QCheckBoxes with a single click, not two clicks (1st to activate the editor and the second to change the state).
I have the QSqlQueryModel setup to allow the one column to be editable, I have also created a QStyledItemDelegate which will display the QCheckBox editor on the far left of the cell when the cell is double clicked, but when it is not active, it displays the underlying value of zero (0) or one (1).
Q: How do I make the table ALWAYS show a CheckBox for this column, not the number zero (0) or one (1)?
Q: How do I set up the table so that a single click will activate and check the QCheckBox?
Sam
Bookmarks