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

If double spin box has a prefix then when typing a decimal point when you are on the decimal point doesn't get treated as pressing the right arrow key

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.5
    • GUI: Text handling
    • None
    • macOS, Windows

    Description

      Issue:-
      If double spin box has a prefix text then when typing a decimal point when you are on the decimal point doesn't get treated as pressing the right arrow key.

      According to Qt's documentation: when typing a decimal point when you are on the decimal point should be treated as pressing the right arrow key.

      As far as my testing goes, having a suffix text in the double spin box doesn't affect the outcome and behaves correctly as Qt's documentation proposes. 

      Bug found in QDoubleSpinBox class/widget. 

      Steps to reproduce:-

      1. Create a QDoubleSpinBox widget on the GUI.
      2. Add a prefix, suffix and default value to the QDoubleSpinBox.
      3. For testing purposes, lets say the prefix is "pref ". Suffix is " suf" and value is 1.000.
      4. Move the cursor (and click the mouse cursor) to just before the decimal point (i.e. just after number 1).
      5. Press the decimal button '.' on the keyboard.
      6. Notice the cursor doesn't move to just after the decimal point like it should according to the Qt's documentation.
      7. Now get rid of the prefix. (Set prefix to an empty text)
      8. Now repeat steps 4 and 5.
      9. Notice that the cursor moves to just after the decimal point (acts like pressing the right arrow key on the keyboard).

      2 videos have been attached to this bug report that should hopefully help in explaining the bug:-

      better. [Double_spin_box_bug.mp4|blob:https://bugreports.qt.io/4abaf162-988b-4a1b-8193-2dbabb4047ff] [Double_spin_box_bug_closer-look.mp4|blob:https://bugreports.qt.io/4206d0c1-0138-4c68-999e-866150d429ab]

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            ronsed135 Ronil Sedani
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes