[Qt-interest] string to float

Andre Somers andre at familiesomers.nl
Wed Jan 27 10:20:18 CET 2010


yanqzhi at gmail.com wrote:
> When a string converts to a float, the float returned does't exactly
> match the string;
>
> QString str("57.130");
> float a = str.toFloat();
>
> the float is 57.130001.
Welcome to the world of floats :-)

André




More information about the Qt-interest-old mailing list