QCalendarModel::QCalendarModel(QObject *parent) : QAbstractTableModel(parent){ date = QDate::currentDate(); minimumDate = QDate::fromJulianDay(0); maximumDate = QDate(7999, 12, 31); shownYear = date.year(); shownMonth = date.month(); m_firstDay = Qt::Sunday; horizontalHeaderFormat = QCalendarWidget::ShortDayNames; m_weekNumbersShown = true; m_firstColumn = 1; m_firstRow = 1; m_view = 0;}