Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77939

QDoubleSpinBox dot(.) decimal separator disappears for values >= 1000

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.0, 5.12.4, 5.13.0
    • Microsoft Windows 7
      MSVC 2017 32-bit
    • Windows

    Description

      1. Set the dot(.) as decimal separator in Windows(Control Panel -> Region and Language -> Additional settings... -> Decimal symbol)
      2. Create a QDoubleSpinBox widget with 0 - 100000 range.
      3. Set value to 999, press enter, 999.00 will be displayed - OK
      4. Set value to 1000, press enter, 100000 will be displayed - Wrong

      This happens only if the locale are set to their default i.e ui->doubleSpinBox->setLocale(QLocale());
      If they are changed, e.g. ui->doubleSpinBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); the issue won't reproduce.

      Example(doublespinboxtest.zip):

      Note:
      The value returned by QDoubleSpinBox::valueChanged is the right one i.e. when setting the value to 1000 then pressing Enter on the keyboard, the value returned by QDoubleSpinBox::valueChanged is 1000 and not 100000. This means that the problem regards only the data displaying.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            iuliuh Iuliu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes