PyQt5 QColorDialog – Setting Background Color
In this article we will see how we can set background color to the QColorDialog. QColorDialog is the pop up type widget in the PyQt5 used for selecting and creating colors. Color dialog is a huge widget that consists of lots of child widgets so it become tough to set stylesheet to the color dialog as it is a complex widget, below is how the background color to the QColorDialog widget looks like
In order to do this we have to set the stylesheet to the QColorDialog object with the help of setStyleSheet method, below is the style sheet code
background-color : lightgreen;
Below is the implementation
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course