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

After calling QSpinBox::clear, the minimum value is not enforced when manually inputting a number, until acceptable number is entered once

    XMLWordPrintable

Details

    • 1e85ca2e62e9aba553a53effabf52272aa3acb70 (qtbase/5.6, 25.8.2016, 5.6.2)

    Description

      When using QSpinBox and calling clear on it, manually inputting a value less than minimum does not default to the pre-set minimum value until a proper value has been set once.

      Steps to reproduce:

      • Run attached sample
      • Notice that range of 6...100 has been set for the QSpinBox, and clear has been called
      • Insert number 5 to the QSpinBox and press Enter
      • EXPECTED: Number 6 is inserted to the QSpinBox
      • ACTUAL: Number 5 stays in the QSpinBox

      Way to avoid this behaviour:

      • Run attached sample
      • Insert number 7, press Enter
      • Observe that 7 is set properly
      • Change the 7 to 5, press Enter
      • Number is properly changed to 6

      Also, if user enters too small number, and clicks the spinbox up/down controls, the minimum value is properly enforced. This behaviour requires that the clear() is called for the QSpinBox and the number is entered manually, it is not reproducible otherwise. Probably the cleared flag is causing some problem here.

      Attachments

        1. qtbug55249_diag.diff
          2 kB
        2. qtbug55249.zip
          1 kB
        3. qtbug55249.zip
          0.7 kB

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              jussi_witick Jussi Witick
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes