arg replaces the sequence with the lowest value after % . The range should be between 1 and 99. Therefore, you do not need to use index 1 , you can use a two-digit number instead of a single character.
Try this and see what happens:
qDebug() << QString("%111%22").arg(66).arg(77);
This should give the expected result (I tested it on qt 5.4 and it works great).
I also tested the comment on the form form in the question, and it works with:
qDebug() << QString("%011%02").arg(66).arg(77);
source share