|
> I see, but QTableItem is trying to interpret strings in the current
> locale. In the US locale "100,000" is a number and "100000" is not.
>
> Which number is prettier by the way?
100,000 is prettier for sure, but i would expect 100000 to be a number as well.If 100000 is not a number shouldn't QString::number produce localized output? I am using %L trick to achieve it.
> Mmmh... toInt() is supposed to be formatting number according to the
> locale. At least the source code seems to be using the locale. How
> doesn't it work for you? What do you see and what do you expect?
On the contrary to the info above I am getting 100000 right aligned (reognized as number) and 100,000 left aligned (recognized as text).
My locales shouldnt be a problem cause i am using %L to produce formatting.
And I am expecting both of them right aligned as they are numbers to me ;).
On Monday 25 October 2004 11:50, Dimitri wrote:
> Hi,
>
> >>QTableItem should align "100,000" but not "100000", shouldn't it? What
> >>do you expect and what do you see?
> >
> > I want them both right aligned. They are both numbers after all. One
> > being pretier.
>
> I see, but QTableItem is trying to interpret strings in the current
> locale. In the US locale "100,000" is a number and "100000" is not.
>
> Which number is prettier by the way?
>
> > Apparently toInt doent understand locale settings, otherwise the code
> > below should align it properly as number, right?
>
> On the contrary, toInt() is supposed to understand locale settings.
> Which exact code are we talking about, and what should be aligned as a
> number?
>
> > That is not my problem at the moment but I think it is a bigger problem
> > for a lot of people if toInt doent understans local formatting .
>
> Mmmh... toInt() is supposed to be formatting number according to the
> locale. At least the source code seems to be using the locale. How
> doesn't it work for you? What do you see and what do you expect?
>
> --
> Dimitri
>
> --
> List archive and information: http://lists.trolltech.com/qt-interest/
|