PDA

View Full Version : QDoubleSpinBox and QLocale



guidupas
24th April 2014, 22:35
Hello everybody!

I am trying to use a set a QLocale in a QDoubleSpinBox, but its not working. The data input does not change at all.

What am I missing?

Thanks a lot.



QDoubleSpinBox *doubleSpinBoxEditor = new QDoubleSpinBox(parent);
doubleSpinBoxEditor->setDecimals(4);
doubleSpinBoxEditor->setAlignment(Qt::AlignRight);
doubleSpinBoxEditor->setPrefix("$ ");

doubleSpinBoxEditor->setLocale(QLocale(QLocale::Portuguese, QLocale::Brazil));
return doubleSpinBoxEditor;