就一个数字的话,直接调用QByteArray::toInt()一类的就可以了:
double toDouble ( bool * ok = 0 ) const
float toFloat ( bool * ok = 0 ) const
QByteArray toHex () const
int toInt ( bool * ok = 0, int base = 10 ) const
long toLong ( bool * ok = 0, int base = 10 ) const
qlonglong toLongLong ( bool * ok = 0, int base = 10 ) const
温馨提示:答案为网友推荐,仅供参考