In this article we will see how we can get the selected color of the QColorDialog widget. Selected color is the color that the user selected by clicking the OK or equivalent button.
Note : This color is not always the same as the color held by the currentColor property since the user can choose different colors before finally selecting the one to use.
In order to do this we use
selectedColor method with the QColorDialog object
Syntax : dialog.selectedColor()
Argument : It takes no argument
Returns : It returns QColor object
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