PDA

View Full Version : Customize QCalendar Widget



NoRulez
1st October 2009, 08:42
Hey @all,

attached is a simple example of how i want to implement. The question is only how?
Can anybody give me hints, examples or something similar to add such text, change the background color of a cell, and add status icons on the top of each cell?

Thanks in advance

Best Regards
NoRulez

caduel
1st October 2009, 14:11
a) use a QTableView with a custom delegate to render the days; you'd have to provide the "layout" yourself
b) use QGraphicsView; you have to do all the calender stuff yourself, but get lots of help with things like "display text", mouse events etc.
c) maybe you can derive from QCalenderWidget and override QCalenderWidget::paintCell(); you have to enlarge the widget though...
d) derive from QWidget (i.e. do all by yourself)

Pedro Cavalcante
17th August 2010, 21:27
Hi NoRulez,

Could you help me to implement a QCalendar like the picture? I work with QT but i don't know to reimplement widget.
Thanks.