Toggle checkbox in QTableView with one click
-
I need to make one column in QTableView with a check-box/radiobutton.
I can override print() and createEditor(...) methods but as for me it will be too rough (or wry).
And if i want to (de-)select some of them i must first of all initiate editor and after that de-select checkbox.
I want QCheckBox's behavior in QTableWidget but use QTableView / QAbstractTableModel. -
Hi and welcome to DevNet!
I think you have to work with delegates for your purpose.
Maybe "this":http://qt-project.org/faq/answer/how_can_i_align_the_checkboxes_in_a_view is what you're looking for.