[Qt-interest] How calculate time span (days, hours, minutes) QDateTime difference?

Dan White ygor at comcast.net
Sat Jun 12 05:39:16 CEST 2010


Thanks for that clarification.

I just used qDebug for the quick-and-dirty demonstration.

Your counter-example is much more appropriate for production type  
code.  Very neat and complete.

On Jun 11, 2010, at 7:01 PM, Scott Aron Bloom wrote:

> You are getting the quotes because qDebug puts quotes around all  
> strings
> when it prints them out...
>
> If you did..
>
> QMessageBox::information( NULL, "Title",  tr( "Arrival:  
> %1<br>Departure:
> %2<br>Days: %3 When:%4" ).arg( arrival.toStrign() ).arg(
> departure.toString() )..... )
>
> It would display fine
>
> Scott



More information about the Qt-interest-old mailing list