New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localization issue when entering decimals in mrview on Windows #447
Comments
I assume this a problem specifically with the text entries that can be adjusted with the mouse...? These are instances of the AdjustButton class. If that's the case, I have a feeling this will be due to a conflict between the QDoubleValidator, used internally by our AdjustButton class, and our There's two options here: fix the AdjustButton class to honour the locale (so avoid using the |
I would be happy with mrview ignoring the locale. Keeps things simple and
|
Cool. In which case, we need to implement our own validator - or figure out if we can override the locale assumed by the existing QValidator. By the way, when I say 'we', I mean someone with more time on their hands than me... 😉 |
On that note: it might be that we can override the locale at the global application level, which would probably be the best thing to do anyway... |
http://doc.qt.io/qt-5/qlocale.html#setDefault might do the trick. |
Seems perfect. Guess the best place to put it would be here? Do you want to give this a go? |
Will do. Do you think |
Seems to fix the problem with the decimal separator. |
I'm happy with just the standard C locale... Go for it. |
Guess this is closed... |
On Windows, my localization is set to Dutch (Belgium), which mean the decimal separator is a comma instead of a point. This causes the text boxes in mrview to completely ignore decimal separators, regardless of whether I use a comma or a point.
Changing the decimal separator in the windows localization settings to point fixes the issue.
This is not an issue on Mac OS X, where I can just use the point separator even though my localization is set to comma.
The text was updated successfully, but these errors were encountered: