[Qt-interest] I am facing a problem
Thomas Dähling
t.daehling at googlemail.com
Wed Aug 12 15:41:05 CEST 2009
Basically what Sean said. Also, why not just use a QIntValidator?
2009/8/12 Sujan Dasmahapatra <sujan.dasmahapatra at gmail.com>:
> Dear Friends
> I am facing a problem for this code below.
>
> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> int numberOfPoints = 201;
> QString testNumberOfPoints = QString::number(numberOfPoints);
> for(i=0; i<testNumberOfPoints.length(); i++)
> {
> qDebug() << testNumberOfPoints.at(i) << "\n";
> if(testNumberOfPoints.at(i) != '0' ||
> testNumberOfPoints.at(i) != '1' || testNumberOfPoints.at(i) != '2' ||
> testNumberOfPoints.at(i) != '3' ||
> testNumberOfPoints.at(i) != '4' || testNumberOfPoints.at(i)
> != '5' || testNumberOfPoints.at(i) != '6' || testNumberOfPoints.at(i) !=
> '7' ||
> testNumberOfPoints.at(i) != '8' || testNumberOfPoints.at(i)
> != '9')
> {
> QMessageBox msg;
> msg.setText("The geomertry file is not a valid .dat
> format");
> msg.exec();
> return ;
> }
> }
> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> The value is 201 you can see but still it's returning !!!
> Can anyone tell me why this is happening ??
> --
> Thanks & Regards
> S. Dasmahapatra
> B.E. (Aeronautics-Aerodynamics)
> Bangalore, India
> Ph:91-9900839788
> Office:91-80-66470248
> mail id : sujan.dasmahapatra at gmail.com
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list