How i can convert int to QString
-
I maked my function to convert int to QString like:
@
QString convertInt(int number)
{
if (number == 0)
return "0";
QString temp="";
QString returnvalue="";
while (number>0)
{
temp+=number+48;
number/=10;
}
for (int i=0;i<temp.length();i++)
returnvalue+=temp[temp.length()-i-1];
return returnvalue;
}
@my quis. is there any function more easy then this.
Thanks
[EDIT: code formatting, please wrap in @-tags, Volker]
-
Thank you so much,it works