 <p>If you rellay don't want to use the lenght.... use the maths!</p> <pre><code>my_str = Qstring::number(my_str.toInt()*pow(10,2-log10(my_str.toInt()))) </code></pre> <p>or:</p> <pre><code>my_str = my_str.append('0',2-log10(my_str.toInt())) </code></pre> <p>but it would be much simpler/quick to do this:</p> <pre><code>my_str = my_str.append('0',3-my_str.length()) </code></pre>