PDA

View Full Version : QDateEdit Color dates in red color



ad3d
23rd August 2011, 10:54
Hi Guys,

i am using QDateEdit whose setCalenderPopup property is set to TRUE. Now i want to set some of dates in that calender to RED color.

For QCalenderWidget i am using setDateTextFormat to set red color for the dates but can someone plz help me in doing same thing for QDateEdit..

i tried

dob_date = QtGui.QDateEdit()
self.dob_date.setCalenderPopup(True)
dob_cal = self.dob_date.calenderWidget()
self.dob_cal.setDateTextFormat(date,Format)

but its not working out...

Thanx in advance
ad3d

high_flyer
23rd August 2011, 11:37
you can always fall back to setForegroundRole().
Try it.