I'm working on a simple app with PyQt6 right now, and I have a table that I'm changing the background color of the columns based on the content. The problem is, when I click on one of the boxes, then click somewhere outside the table, it leaves the box highlighted grey. Anyone know how to fix this? I feel like it should be simple but I can't find anywhere how to fix it.
So far I've tried changing the focus policy to no focus, but that doesn't get rid of the grey box, it just gets rid of the bright blue highlight that is only there when I click on it.
I also tried changing the background color to white when the focusOutEvent happens, but that doesn't fix it either.