原文:http://stackoverflow.com/questions/16633555/how-to-convert-qstring-to-int

--
QString
Abcd="123.5 Kb"

Abcd.split(" ")[0].toInt()//convert the first part to Int

Abcd
.split(" ")[0].toDouble()//convert the first part to double

Abcd.split(" ")[0].toFloat()//convert the first part to double
文章標籤
全站熱搜
創作者介紹
創作者 克理斯 的頭像
克理斯

過自己想過的生活

克理斯 發表在 痞客邦 留言(0) 人氣(82)