How convert int to string with 2 fields?
Unsolved
General and Desktop
-
wrote on 22 Aug 2019, 12:44 last edited by
I need to convert numbers to string, but with 2 fields, for examples:
If int num=1, I need Qstring txt = "01"
If int num=23, I need Qstring txt = "23"Thanks
-
I need to convert numbers to string, but with 2 fields, for examples:
If int num=1, I need Qstring txt = "01"
If int num=23, I need Qstring txt = "23"Thanks
that's like super easy to google 🤔
https://stackoverflow.com/questions/2618414/convert-an-int-to-a-qstring-with-zero-padding-leading-zeroesQString number = QString("%1").arg(yourNumber, 2, 10, QChar('0'));
-
wrote on 22 Aug 2019, 13:57 last edited by
Thanks, I couldn't find it in google
-
wrote on 22 Aug 2019, 14:45 last edited by
@enrique82 if your issue is solved, please don't forget to mark your post as such! Thanks
1/4