QCalendarWidget is really composed of a couple of other widgets. The main widget is the table you see that displays days of month. This table is a QTableView and can be extracted from the calendar widget using QObject::findChild(). Once you have that widget, you can access its API including QAbstractItemView::itemAt() which will return you the day of month at a specified point in the view's viewport coordinates. Then you can use QCalendarWidget::setSelectedDate() to select that date.





Reply With Quote
Bookmarks