Copy link to clipboard
Copied
Hi, I'm working on a tool that involves a QTableWidget. I'm trying to set the background color of individual cels based on texture assignements. The problem is, no matter what I try, the color stays the default Designer background color. I've tried QTableWidgetItem.setBackgroundColor() and QTableWidgetItem.setBackground (brush) and it doen't change. Setting a stylesheet for the QTableWidget does change the background color, but it changes it for all items and I still cannot set individual item colors.
-chad
Copy link to clipboard
Copied
FYI - I don't know why Designer prevents setting background colors for table widget items, but I solved the issue by writing a custom itemDelegate and overriding the paint function.