The wiki is in the process of moving to Please make your edits there.

How_to_Add_Holidays_to_QCalendarWidget | Qt Wiki | Qt Project

English Български

How to Add Holidays to QCalendarWidget

The following source code marks 3 March 2013 at QCalendarWidget [] as a Holiday using the same weekends’ QTextCharFormat [].

  1. QDate date(2013,3,3);
  2. QTextCharFormat format = myCalendarWidget->weekdayTextFormat(Qt::Saturday);
  4. myCalendarWidget->setDateTextFormat(date, format);