In this article, we will see how we can get the accepted signal of the QColorDialog widget. This signal is emitted when the dialog has been accepted either by the user or by calling
done() with the QDialog::Accepted argument.
Note : This signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.
In order to do this we use
accepted method with the QColorDialog object
Syntax : dialog.accepted.connect(lambda: print(“Accepted Signal”)
Argument : It takes method as argument
Action Performed : It will call the passed method when accepted signal emitted
Below is the implementation
Accpeted Signal Accpeted Signal
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.