Hi,

I'm having a problem rounding. See the following code:

Qt Code:
  1. QLocale::setDefault(QLocale(QLocale::Portuguese, QLocale::Brazil));
  2. ...
  3. double x = 47.785;
  4. QString str = l.toString(x, 'f', 2);
  5. qDebug() << str; // Output 47,78
To copy to clipboard, switch view to plain text mode 

The expected result would be 47.79, is correct in not making the rounding? I noticed that he only does when rounding the third decimal place is greater than 5.

Thanks,

Marcelo E. Geyer