View Full Version : How to link A label with CalendarWidget

29th October 2008, 03:39

I need to connect a CalenderWidget to a label. i.e. Whenever I click on the label the calenderWidget should appear and after selecting the date the calender should disappear.
Could anyone please let me know how to achieve this. It should work in the similar way how it works when we make calender popup as true for QDateTimeEdit.

Thanks and Regards

29th October 2008, 07:07
You can subclass QLabel and implement calendar popup on mousepress...

Psstt : You can also use a QPushButton and set its flat property true (QPushButton::setFlat) :)

29th October 2008, 10:49
I think it would be better if you use QDateEdit and QCalendarWidget. Subclass QDateEdit so that your DateEdit will show QCalendarWidget when DateEdit is clicked.