[code:1]
QString strNum = "168";
bool ok;
int value = strNum.toInt(&ok);
if(ok)
printf("value: %d\n", value);
else
printf("conversion failed\n");
[/code:1]
[code:1]
int value = 888;
QString strNum = QString::number(value);
/*
see assistant, followings have same effect as above
strNum.sprintf("%d", value);
strNum = QString("%1").arg(value);
*/
[/code:1]