Showing calendar on date edit in TableView (using models)
-
Hello everybody!
I'm developing Qt application(obvious, but to start with).
I have tableview which has tablemodel written by me in the background.
I have a date field that I want to be edited. I return QVariant od QDate type (I tried DateTime and so on) and my field looks like dd-mm-YYYY with up and down arrows. When I was working with QSqlTableModel I noticed, that they have a calendar popup to edit date. I strongly need to do the same thing. There was no delegates in the source files but maybe I am wrong. Please tell me how to show calendar when a user edits date. Thank you! -
Answer is to create user-delegate from DateEdit widget and set popupCalendar(true)