PyQt5 QCalendarWidget – Clicked signal
In this article we will see how we can get the clicked signal from the QCalendarWidget. Clicked signal is emitted when a mouse button is clicked i.e when the mouse was clicked on the specified date. The signal is only emitted when clicked on a valid date, e.g., dates are not outside the minimum date and maximum date. If the selection mode is NoSelection, this signal will not be emitted.
In order to do this we will use clicked method with the QCalendarWidget object.
Syntax : calendar.clicked.connect(lambda: print(“Clicked”))
Argument : It takes method as argument
Action Performed : It will print the message whenever activated signal get emitted
Below is the implementation