Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4.2
-
None
Description
I created a QDateTime Axis and set the format to HH:mm:ss (date is not displayed).
I set the labels to be editable and edited some labels. After editing the label date got changed.
I think the source of the issue is the following: after the label edit the user input string got parsed by the formatter string:
https://code.qt.io/cgit/qt/qtcharts.git/tree/src/charts/axis/datetimeaxis/datetimeaxislabel.cpp#n18
However if the user sets a formatter which does not includes the date part the conversion could lead to a different date.
As I am the one who made this mistake I would like to fix it, however I would like to ask for some guidance on how should it be done. To properly handle this we would need to "merge" the previous date to the edited, but to do that it would be necessary to interpret the format to see which parts of the datetime have been involved by the editing. Maybe there are some similar code in the Qt codebase?