2
I need to pick a date QDateEdit
. I did the designer using Qt Designer, in properties activated calendarPopup
and the displayFormat
for dd/MM/yyyy
.
I want to capture this date to insert in a query. I have tried using the following codes:
data = self.dlg.data.currentDate() # apresenta um erro 'QDateEdit' object has no attribute 'currentDate'
I’ve tried another way:
data = self.dlg.data.date() # Até pego a data, mas no formato estranho veja: "PyQt4.QtCore.QDate(2016, 9, 14)"
I also used:
data = self.dlg.data.currentSection() # traz um número 512, mas não no formato dd/MM/yyyy.
What is the solution?
Man, I spent a lot of time looking at the Qdateedit documentation and I didn’t see it and you answered me in a matter of minutes.
– Francisco Fabio
Thanks, bro. Thank you!
– Francisco Fabio