diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp index 9559b58339..4946969360 100644 --- a/src/widgets/widgets/qcalendarwidget.cpp +++ b/src/widgets/widgets/qcalendarwidget.cpp @@ -1946,8 +1946,8 @@ void QCalendarWidgetPrivate::updateNavigationBar() QString monthName = q->locale().standaloneMonthName(m_model->m_shownMonth, QLocale::LongFormat); monthButton->setText(monthName); - yearButton->setText(QString::number(m_model->m_shownYear)); yearEdit->setValue(m_model->m_shownYear); + yearButton->setText(yearEdit->text()); } void QCalendarWidgetPrivate::update()