[Qt-interest] Why this double is not valid by QDoubleValidator
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Thu Aug 27 17:47:42 CEST 2009
Are you not using this in a GUI? Are you using it to parse bulk data?
If so.. look inside the QDoubleValidator code, find the regex they are
using and extend it to support an optional number at the end, rather
than a required number.
Or you might want to google "regex for doubles"
Scott
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Sujan
Dasmahapatra
Sent: Thursday, August 27, 2009 8:36 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Why this double is not valid by
QDoubleValidator
So can u suggest how would I handle these data I have a large set of
data where may be the integer after E is missing it should be assumed to
be 0 if value is there.
Any idea !!
On Thu, Aug 27, 2009 at 6:28 PM, Benjamin Lau <blwy10v at gmail.com> wrote:
On Thu, Aug 27, 2009 at 11:22 PM, Sujan
Dasmahapatra<sujan.dasmahapatra at gmail.com> wrote:
> It's scientific notation right . By default Validator supports
scientific
> notation.
>
It's only scientific notation when there is an integer after the E.
Otherwise it isn't scientific notation, or in Qt's validator system,
Intermediate.
> On Thu, Aug 27, 2009 at 4:45 PM, Srdjan Todorovic
> <todorovic.s at googlemail.com> wrote:
>>
>> Hi,
>>
>> On 27/08/2009, Sujan Dasmahapatra <sujan.dasmahapatra at gmail.com>
wrote:
>> > Dear Friends
>> > Why QDoubleValidator is not accepting the value below as a double
with
>> > default settings.
>> >
>> > "-0.0000888889E"
>>
>> is E a valid double?
>> Did you miss out the exponent?
>>
>> Srdjan
>> _______________________________________________
>> 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
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
_______________________________________________
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/20090827/54d92ade/attachment.html
More information about the Qt-interest-old
mailing list