I am quite new to PyQt. Does anyone tell me how to get the background color of a button or label (QPushButton, QLabel) in PyQt.
3
votes
3 Answers
2
votes
I haven't used PyQt, but I think API should be very similar to C++. To get background color of QWidget-based class, first get its palette and then call QPalette::color() with QPalette::Window role.
7
votes