Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.5
-
None
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:-
- Create a QDoubleSpinBox widget on the GUI.
- Add a prefix, suffix and default value to the QDoubleSpinBox.
- For testing purposes, lets say the prefix is "pref ". Suffix is " suf" and value is 1.000.
- Move the cursor (and click the mouse cursor) to just before the decimal point (i.e. just after number 1).
- Press the decimal button '.' on the keyboard.
- Notice the cursor doesn't move to just after the decimal point like it should according to the Qt's documentation.
- Now get rid of the prefix. (Set prefix to an empty text)
- Now repeat steps 4 and 5.
- 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]