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
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