[Interest] Advanced QString::arg overloads from QML?

Elvis Stansvik elvstone at gmail.com
Sun May 29 12:36:13 CEST 2016


Hi all,

Is there any way to tap into the functionality of the various
QString::arg overloads such as

    http://doc.qt.io/qt-5/qstring.html#arg-4

from QML?

I know QML extends the string type with .arg, but it seems it only
supports one argument.

I'd like to do

    '%1'.arg(value, 2, 10, '0')

to zero-pad to 2 digits.

Thanks,
Elvis



More information about the Interest mailing list