Displaying the date selected by the user from Calendar Widget
This application will make use of two widgets, Calendar Widget and Date Edit. The date selected by the user from Calendar Widget will be reflected in the Date Edit widget. Both widgets are commonly used when displaying current date as well as the date required by the user, with the only difference that Calendar Widget has a bigger and more readable visual, whereas the Date Edit widget consumes much less space.
Getting ready
To make this recipe, we need to understand the following things first:
Calendar Widgetdisplays the desired monthly calendar- The
QDateclass accesses the date from the system clock - The
Date Editwidget will display the date that is selected fromCalendar Widget
So, let's first understand the preceding widgets and class one by one.
Displaying a calendar
In order to enable the user to select a date, you need to display a monthly calendar. Calendar Widget in Qt Designer helps in doing so. This widget is an instance of...