QString和int string的相互转换
1)QString转int
QString str("100");
int tmp = str.toInt();
2)int转QString
QString::number();
QString str = QString::number(tmp);
(1)QString转String代码如下:
QString QS;
String s = QS.toStdString();
(2)String转QString
String s = Qstring::fromStdString(QS);