PyQt5 QColorDialog – Setting Custom Color
In this article we will see how we can set the custom color in the QColorDialog widget. Custom colors are the color made by the user they can be set at the run time with the help of mouse although we can add custom color programmatically, by default all custom colors are white. Below is how the custom color in color dialog looks like In order to do this we use setCustomColor method with the QColorDialog object
Syntax : dialog.setCustomColor(i, color) Argument : It takes integer i.e index and QColor object as argument Return : It returns None
Note : This function does not apply to the Native Color Dialog on the macOS platform. If you still require this function, use the QColorDialog.DontUseNativeDialog option. Below is the implementation
Please Login to comment...