I'm currently developing a cross-platform app (current developing it's under Ubuntu 18.10 and Windows 10) with PyQT 5.13.1 on Python 3.6/3.7. I'm using a QTableWidget that I've initialized in this way:
myTable = QTableWidget()
myTable.setSelectionBehavior(QAbstractItemView.SelectRows)
myTable.setSelectionMode(QAbstractItemView.SingleSelection)
myTable.setAlternatingRowColors(True)
At app's start, my table has two columns but is empty (no rows) and I've a button to add rows one by one. When I do this the first time, the first row is added and it shows with the first cell with a sort of light blue highlight (in both Ubuntu and Windows) and the second cell without it, as in this screenshot:
If I click on any of those cells, the entire row is selected and shows a blue background, accordingly with the setSelectionBehavior
initialization. If I CTRL+Click that selected row, it got deselected and goes back with the first cell active/highlighted and the second not. My question is: is there a way to completely remove that highlight (what I'd prefer) or to extend it also to adjacent cell? I've read around that one possible solution wuold be to disable table's focus, but I wish to avoid such a solution.
Thank you all in advance!