openBrain wrote:This ticket is "dot instead comma". Not the purpose here as it is to allow both. Also the ticket you pointed never had a forum discussion. See why it never get audience ?
Interpreting both dots and commas as a decimal point is even worse because this introduces an ambiguity and can cause unexpected behaviour. No other SW package I know of implements such a strange behaviour.
IMO, our FreeCAD specific widgets are extensions of Qt widgets to support quantities or allow to bind expressions. But the fundamental behaviour must not be different to the Qt widgets.
uwestoehr wrote:That does not mean I am in general opposed to it, but it must be discussed carefully and is nothing for the first day after a feature freeze
There is no feature freeze yet. Only because triplus claimed it doesn't mean it's officially announced.
I see now. Where can I find the policy that one should use this? As I wrote, I have seen at different places that QDoubleSpinBox is still in use - maybe it is not well communicated that one must use Gui::DoubleSpinBox instead of QDoubleSpinBox.
There is no such policy. Everybody who thinks that for his spin boxes neither quantities nor expressions are needed is free to use QDoubleSpinBox or QSpinBox.
So, what would be OK for me is to flip the behaviour of group separator and decimal point but interpreting both characters as decimal point is a no-go. It's actually easy to interpret the dot as decimal point. All what must be done is to implement an option in the preferences if the application-wide locale should be set to "C" and inside the Application constructor this line must be added:
Code: Select all
QLocale::setDefault(QLocale(QLocale::C));
A nice side-effect of this change is that also Qt's QDoubleSpinBox interpret dot as decimal point. Hence no need to change any widget classes directly.