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

QDoubleSpinBox maximum rounds incorrectly when working with big numbers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 5.12.6
    • 5.8
    • None
    • QtCreator 4.8.1 (based on Qt 5.12) on Windows 10 x64
      Project version - QT 5.8

    Description

      When using QDoubleSpinBox maximum with big numbers, the program at runtime rounds the max incorrectly. The tests were made on a widget project on a Windows machine using QT 5.8. The values were set with the Qt Designer - not in code. The values look OK in the Designer but during runtime they round unexpectedly. The issues were found only in QDoubleSpinBox, QSpinBox behaves as expected.

      The other variables in the QDoubleSpinBox do not seem to matter.

       

      Examples:

      When entering 999 999 as max the program behaves normally -> the max is 999 999

      999 999.99 rounds up to 1 000 000.00

      999 999.50 rounds up to 1 000 000.00

      999 999.49 rounds down to 999 999.00

      9 999 999 rounds up to 10 000 000

      9 999 995 rounds up to 10 000 000

      9 999 994 rounds down to 9 999 990

      99 999 999 rounds up to 100 000 000

      99 999 950 rounds up to 100 000 000

      99 999 949 rounds down to 99 999 900

      and so on...

       

      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
            vbgf Vasil Kolev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes