标签:ber std comm div 转换 code str col int
1 QString与int相互转换
QString qstr = QString::number(123); int i = atoi(qstr.toStdString().c_str());
也可以这样:
int i = atoi(qstr.ascii());
2 QString与string,即std::string
string s = qstr.toStdString(); QString qstr2 = QString::fromStdString(s);
标签:ber std comm div 转换 code str col int
原文地址:https://www.cnblogs.com/lixuejian/p/12912034.html