I am looking for a way to disable -not hide- a specific section of header in a QTableView
, I have already found a method that disables all the sections:
tableView.horizontalHeader().setDisabled(True)
tableView.verticalHeader().setDisabled(True)
but I need to disable only a 'specific' section.
Edit:
The header in the image below is disabled by the method call QHeaderView.setDisabled(True)
.
I just want to disable the last section of the header -not all of them-, and there's no need to disable the section's corresponding cells.
And by disable, I mean disable all of the selection, hovering, sorting,... behaviors.