Qt QString判断是否是数字

 1 bool VerifyNumber(QString str)
 2 {
 3     std::string temp = str.toStdString();
 4     for (int i = 0; i < str.length(); i++)
 5     {
 6         if (temp[i]<'0' || temp[i]>'9')
 7         {
 8             return false;
 9         }
10     }
11 
12     return true;
13 }    
原文地址:https://www.cnblogs.com/ybqjymy/p/14892743.html