summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsview.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-03-17 18:07:15 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-03-20 22:18:00 +0100
commit580e9eedf783ccbdcb67baa3d1a9dcdd53922f86 (patch)
tree746a02c588443b3b9eb1777f63af5c67a783c6df /src/widgets/graphicsview/qgraphicsview.cpp
parent30a0787907981da3811390735bf234068fc89944 (diff)
QDateTimeEdit: with keyboardTracking off, allow values outside the range
QDateTimeEdit very aggressively prevents user input that would result in values that are outside the dateTimeRange. While keyboardTracking is on this makes sense, as otherwise the dateTimeChanged signal would be emitted after each section, with a value that is outside the range. However, this prevented users from entering a date that is allowed, but where sections of the date are above or below the respective section in the maximum or minimum value. If keyboardTracking is off, QDateTimeEdit only emits the dateTimeChanged signal at the end of editing, when focus is lost or the return key is pressed, and then it enforces that the value is within the range anyway. This change makes the parser ignore the range during editing if keyboardTracking is off, thus allowing the user to enter a date where temporary values are outside the range. The test makes sure that we don't get signals emitted with out-of-range values, testing both with and without keyboard tracking. Change-Id: I00fb9f1b328a3477163f890c4618b40878657816 Fixes: QTBUG-65 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsview.cpp')
0 files changed, 0 insertions, 0 deletions