In this article we will see how we can get the focus proxy to the QCalendarWidget. Focus proxy is the setting focus to calendar indirectly i.e by setting focus to the child of it. For example some widgets can “have focus”, but create a child widget, such as QLineEdit, to actually handle the focus. In this case, the widget can set the line edit to be its focus proxy. By default calendar’s QTableView has focus proxy although it can be changed with the help of
In order to do this we will use
focusProxymethod with the QCalendarWidget object.
Syntax : calendar.focusProxy()
Argument : It takes no argument
Return : It return QWidget object
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.