Is there a way to define sets of checkable cells in a QTableWidget so that at most one cell can be checked?
Is there a way to define sets of checkable cells in a QTableWidget so that at most one cell can be checked?
Without looking deeper into that I see two options:
1) connect to the table widget's itemChanged() signal and in the slot check if the item is checked and if it is uncheck all that are exclusive
2) derive from QTableWidgetItem, reimplement setData() to intercept Qt::CheckRoleState and do the unchecking in there (or delegate to a class that does it)
Cheers,
_
davethomaspilot (9th August 2014)
Ok, I'll do option 1.
Thanks,
Dave Thomas
Bookmarks