How to select a QTableWidget cell containing a QCheckBox
I have a QTableWidget in which I have set some cells to contain QCheckBox'es. When the dialog is running, if I click in a cell containing a checkbox, it will be selected, and turn blue. How can I make this happen programmatically? I tried using setCurrentCell() but that seems to invoke a different kind of selection, where the item only turns grey, which is indistinguishable on rows that are already grey (I'm using the "alternating row colors" setting).
Any help would be greatly appreciated!
Jeff
Re: How to select a QTableWidget cell containing a QCheckBox
Take a look at QItemSelectionModel. You can get pointer to it from the QTableWidget with the method selectionModel(). Good luck. :)