QStringstrNum=QString::number(12);
qDebug()<<"test="<<strNum;
intnum=strNum.toInt();
qDebug()<<"test2="<<num;打印出如下:
test = "12"
test2 = 12