I'm afraid this is not possible to do within designer unless you're happy with setting an input mask. In code, you could catch focus out event and and apply a localized number when appropriate, for example like this:
Qt Code:
  1. // MyLineEdit inherits QLineEdit and reimplements QWidget::focusOutEvent()
  2. void MyLineEdit::focusOutEvent(QFocusEvent* event)
  3. {
  4. QLineEdit::focusOutEvent(event);
  5.  
  6. bool ok = false;
  7. double real = text().toDouble(&ok);
  8. if (ok)
  9. setText(QLocale(QLocale::English).toString(real, 'f', 2));
  10. }
To copy to clipboard, switch view to plain text mode