In this article we will see how we can get the rejected signal of the QColorDialog widget. This signal is emitted when the dialog has been rejected either by the user or by calling
done() with the QDialog::Rejected 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
rejected method with the QColorDialog object
Syntax : dialog.rejected.connect(lambda: print(“Rejected Signal”)
Argument : It takes method as argument
Action Performed : It will call the passed method when rejected signal emitted
Below is the implementation
Rejected Signal Rejected 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. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course