Reputation: 745
I have a QDateEdit and set some date on it .But when i mouse press on date part automatically changes i dont want this behaviour to happen and this happens only when i have the following option on date edit,i want to change the date only when user click on the popup menu or when he edits in line edit part.I have attcahed a video for much better understanding.Any help on the issue is highly appreciated.
QDateEdit *startDateEdit = new QDateEdit;
QDateEdit *endDateEdit = new QDateEdit;
startDateEdit->setCalendarPopup(true);
startDateEdit->setDate(QDate::currentDate());
endDateEdit->setCalendarPopup(true);
endDateEdit->setDate(QDate::currentDate());
[Sample][1] [1]: https://www.youtube.com/watch?v=qwN_QAti6Sg
Upvotes: 0
Views: 440
Reputation: 1310
As QDateEdit class is inherited from QAbstractSpinBox you can solve your problem with adding the next (the problem seems a little bug):
dateEdit->setButtonSymbols(QAbstractSpinBox::NoButtons);
Upvotes: 2