[Qt-interest] How calculate time span (days, hours, minutes) QDateTime difference?
Ed Sutton
ESutton at fescorp.com
Fri Jun 11 22:30:11 CEST 2010
Hi Sean,
>>
>>
>> QDateTime::secsTo() does the trick with some additional work.
>>
>> I was hoping I had missed the Qt equivalent of the .NET TimeSpan structure.
>>
>> http://msdn.microsoft.com/en-us/library/system.timespan.aspx
>
> >Yes I have been thinking about adding something like this for a while now.
> Maybe I will try to put a merge request together on gitorious for such a
> class.
I think a TimeSpan class would be widely appreciated and used!
>
> >Does anybody have any other features that they would like for such a class?
Personally I would model it after the .NET TimeSpan structure as much as possible. I think it is intuitive and cannot imagine how it can be improved substantially.
http://msdn.microsoft.com/en-us/library/system.timespan.aspx
Thank you for your time,
-Ed
More information about the Qt-interest-old
mailing list