got stuck on this part of my program.. and it seems i cant find a decent
example of how to do this..
i got a QDateTimeEdit object
i already set its displaying value to what my current system time is using
self.ui.dateTimeEdit.setDate(QDate.currentDate())
its output is for example is 7/16/2012 12:00:00 AM
Now my problem is..
i want to set 12:00:00 AM to 11:59:59 PM
how can i do this please?
thanks to anyone willing to spend time on my question.
There are basically three different objects you can use in PyQt:
QDate
QTime
QDateTime
The QDateTime accepts the other two types. So you can define the date of a QDateTime Object using a QDate instance and the same can be done with QTime.
Obviously, if you’re trying to change the time you need to use a QTime object.
Here are some examples: