[Qt-interest] qDebug() and double values

Phil phillor at telstra.com
Mon Dec 21 04:55:56 CET 2009


Thank you for reading this.

I'm trying to trace numbers similar to the following but qDebug() rounds 
them to integers.

double d = 435850.925;
qDebug() << "d = " << d;

435851 is displayed.

However a smaller number, such as the following, is displayed correctly.

d = 12.125;
qDebug() << "d = " << d;

12.125 is displayed.

Is qDebug() able to display six digit numbers with, say, three digits after 
the decimal point?
 
-- 
Regards,
Phil



More information about the Qt-interest-old mailing list