1.字符串转换为数值 QString str; int val; double f; bool ok; val = str.toInt(); //默认转换为十进制 val = str.toInt(&ok, 2)<