Dennis
Dennis

Reputation: 186

Qt - QCalendarWidget delete all TextFormats

I was wondering if there is a way to delete ALL the QTextCharFormat you've created with QCalendarWidget::setDateTextFormat(...) because I need such a function to update my whole calendar when a new list of QDates is loaded in.

I hope you can help me and else I'll try to just create a new QCalendarWidget everytime a new list is loaded in.

Thank you!

Upvotes: 0

Views: 364

Answers (1)

deW1
deW1

Reputation: 5660

Simply do:

QCalendarWidget::setDateTextFormat( QDate() , QTextCharFormat() );

will set it back to the standard.

Upvotes: 1

Related Questions