[PyQt] QDateEdit is ignoring the sip API level 2
info at linos.es
Tue Jun 7 12:14:57 BST 2011
El 07/06/11 13:07, Phil Thompson escribió:
> On Tue, 7 Jun 2011 11:46:08 +0100, Daniele Esposti<expo at expobrain.net>
>> Well, datetime package doesn't support operations with QDate
>> instances, for example QDateEdit().date() + datetime.timedelta(days=1)
>> raises a TypeError.
> Just use...
> QDateEdit().date().toPyDate() + datetime.timedelta()
>> IMHO it's more clear to return a datetime instance instead a Qt one,
>> like the QLineEdit.tex() method returns a unicode string instead of a
>> QString if the sip API level for QString is set to 2. Again, IMHO.
> I felt that QDate and QTime were too useful to remove.
I felt the same way that Phil, they are useful clases on their own, i much
prefer working with them that with datetime.
More information about the PyQt