I used event filter on my QDateEdit 'sdateEdit' as follows:
bool Class::eventFilter ( QObject *obj, QEvent *event )
{
if(event->type() == QEvent::MouseButtonPress)
{
sdateEdit->calendarWidget()->show();
}
else
return QObject::eventFilter ( obj, event );
}
But this doesnt work. I tried .. sdateEdit->setCalendarPopup(true). This did not work as well.
In this case I have implemented a custom QDateEdit, the strategy is to use eventFilter when you click on the QLineEdit and send a click event to the arrow: