In it's simplest form, use the answer of Georg Fritzsche
For a bit advanced, you can use this,
QString QString::arg ( int a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const
Get the documentation and an example here..