PDA

View Full Version : QT calender widget



manojboopathi
April 9th, 2010, 03:52 PM
Hi guys i am developing system restore in ubuntu.

i wanna display the restore points the same way as it gets displayed in windows xp

is it possible to change the color of individual dates in the calender widget in QT.

waiting 4 reply

Zugzwang
April 9th, 2010, 05:10 PM
That should be possible by deriving from the "QCalendarWidget" and overloading the "paintCell" method.

manojboopathi
April 9th, 2010, 05:56 PM
thanks for your quick rep...

u said it can be done by overloading paintcell method...

after doing that can we obtain which date is clicked by the user..

if possible say me the code of that overloading. i am very new to qt. dont have much knowledge in tweeking widgets

Zugzwang
April 9th, 2010, 06:10 PM
I've never did so much QT coding. However, a quick google search revealed that there seem to be examples lying around on the web, for example the following one: http://www.qtforum.org/article/21614/paintcell-and-qcalendarwidget.html

Jammanuser
April 9th, 2010, 06:21 PM
Let me know how it goes. System Restore in Ubuntu would be nice. :)
BTW, I've been coding in QT for a little while, but I haven't used that particular class yet. Are you using Qt Creator? Pretty much every class in Qt is fully documented. I suggest you read all that you find on that class.