As the old saying goes, a picture is worth a thousand words
Background: If you just set the background color of QTableView, then there is no need to write this blog. There are many such routines on Baidu. But I encountered a problem in it, that is, it didn’t take effect when I set the background color, but I rebuilt a demo and wrote it again, and it took effect again. point.
After adding the QComboBox limit, it will be OK immediately, and the QTableView setting background code will not be posted. There are many Baidu, and I hope it can help people who have the same problem as me.