[Qt-interest] I am facing a problem

Sujan Dasmahapatra sujan.dasmahapatra at gmail.com
Wed Aug 12 18:00:32 CEST 2009


Yes Thats correct Mr Sean I am reading through QTextStream like
 stream >> value;
now whether the value read is a valid double value or somethingelse that I
want to check.
I think QDoubleValidator would be fine  to check that.
On Wed, Aug 12, 2009 at 6:50 PM, Murphy, Sean M. <sean.murphy at gd-ais.com>wrote:

> >> I am reading an int and a double from file.
> >
> > Ah, so this a *totally different issue* than the one you had before!
> > Please start new threads when asking *new* questions.
> >
> >> Can u tell me how could I
> >> check whether it's an int or double.
> >
> > So you are reading a bunch of bytes of "unknown nature". How - in your
> > own words and imagination - should *any* function know whether the
> > data you read as int or double should be really an int or double? In
> other words:
>
> He didn't say whether he's streaming in using a QTextStream or
> QDataStream, maybe he's reading from a QTextStream and he wants to know
> whether he should read the next value in as an int or float (or junk)
> based on the ASCII representation of the number?
>
> Sean
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



-- 
Thanks & Regards
S. Dasmahapatra
B.E. (Aeronautics-Aerodynamics)
Bangalore, India
Ph:91-9900839788
Office:91-80-66470248
mail id : sujan.dasmahapatra at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090812/ef82b63f/attachment.html 


More information about the Qt-interest-old mailing list