hi,
i have searched for QString to int . i got the.Quote:
str.append(QString("%1").arg(int));
Can any one Explain me about the above line.:confused::confused:
Thnx in advance.
Printable View
hi,
i have searched for QString to int . i got the.Quote:
str.append(QString("%1").arg(int));
Can any one Explain me about the above line.:confused::confused:
Thnx in advance.
Obviously there is a lot about this in the QString documentation, including the workings of QString::arg().
Creates a string with %1 as content.
.arg(int) replaces the lowest %N in the string it is called on with a string representation of the int.
The whole new string is then appended to str.
To convert string to int, use str.toInt().