QDate currentDate = QDate::currentDate();
int day = currentDate.day();
QDate newDate = currentDate.addDays(3);
QDate date(2021, 2, 29); if (date.isValid()) { // do something }
QString dateString = currentDate.toString("yyyy-MM-dd");The QDate class is part of the Qt Core library, which is included in the Qt framework.