How can calendar widget's particular cells be coloured?

How can calendar widget's particular cells be coloured?

Answers


I think you should extend the QCalendar Class and add some behavior !

I've found something here : http://www.qtforum.org/article/21614/paintcell-and-qcalendarwidget.html#post79008

As you can see in the example, you could use something like :

QBrush brush;
brush.setColor( Qt::green );
QTextCharFormat cf = calendarWidget->dateTextFormat( date );
cf.setBackground( brush );
calendarWidget->setDateTextFormat( date, cf );

Hope it helps a bit!


Need Your Help

how to change default font size for graphviz?

doxygen graphviz

I use doxygen + graphviz for documenting my code. graphviz does a nice job of generating images.