I would like to change the properties of the QTableView border (colour, weight) under certain circumstances, e.g. when a filter is being applied and not all available elements are visible in the table.

Is is best to modify the QPalette associated the QWidget in an overidden paintEvent? Or is it best to modify the styleSheet?

Any suggestions on the best way to do this?

Thanks
Stefan