From the docs:
fieldWidth specifies the minimum amount of space that argument a shall occupy. If a requires less space than fieldWidth, it is padded to fieldWidth with character fillChar. A positive fieldWidth produces right-aligned text. A negative fieldWidth produces left-aligned text.
So, try
Qt Code:
  1. arg(str1, -20)
To copy to clipboard, switch view to plain text mode