PDA

View Full Version : Subclass QCalendarWidget?



Archa4
24th February 2011, 10:12
My new task is to make a Calendar, that looks like this:
http://img222.imageshack.us/i/calendarx.jpg/

I wonder - is that even possible?
If yes - then what would be the sane way to do it? I mean - the only idea i have now - using parallel QTableWidget and QCalendarWidget, get the dates from QCalendarWidget and using SetItem on each QTableWidget... And I don't this is the best and easiest way to do this...

Archa4
25th February 2011, 07:32
I was told on another forum that i could Subclass the QCalendarWidget, and then rewrite function:
virtual void paintCell ( QPainter * painter, const QRect & rect, const QDate & date ) const

Is this a possible solution?