Thank you Lykurg . I created a subclass as you said except that I set the parent to 0 (I don't see which other value it might be...).

Then I replaced the default calendar of my QDateEdit with the new one as follows:

Qt Code:
  1. CalendarWidget calendarWidget = new CalendarWidget;
  2. myDateEdit->setCalendarWidget(calendarWidget);
To copy to clipboard, switch view to plain text mode 

But I obtain an error message at run time:

QDateTimeEdit::setCalendarWidget: calendarPopup is set to false

Do you see what am I doing wrong ?