Qt - QCalendar paint individual cell
Hello!
I am trying to do something that I initially thought was fairly trivial but has since kept me awake all night trying to figure out... I have a QCalendarWidget that I need to change the cell colours of certain days corresponding with certain data from the database I am using. I have heard a way to do this is with subclassing QCalenderWidget and implementing the paintCell() function though I have found no examples detailing this. If anyone can explain to me the appropriate way of handling this issue, I would greatly appreciate it! Thank you -Gavin |
Hi -
Google "QCalendarWidget paintcell" => Highlight today's date in a QCalendarWidget newcalendarwidget.h Code:
#ifndef NEWCALENDARWIDGET_H Code:
#include <qpainter> |
Thank you!
|
All times are GMT -5. The time now is 02:44 PM. |