Quote Originally Posted by fatecasino View Post
i have an issue with the precision of the conversion.

Qt Code:
  1. QString str="0.1";
  2. double x = str.toDouble();//i get 0.1000000001 !!
  3. x= 2*x;//i get 0.200000003
To copy to clipboard, switch view to plain text mode 

is there a way to correct this?!
No, not with the standard floating point types anyway. This is an architectural problem caused by base2 floating point numbers. There's simply put, no way to fix it. How you respond to it depends on your needs.