QTime, QDate: Add @option-click event #12166
Replies: 4 comments 1 reply
-
|
Add a |
Beta Was this translation helpful? Give feedback.
-
|
Hi, Thx for suggestion. I undestand the possibility of using update:model-value. It is not as easy as in your examle: But my main concern is that nobody says that model value changes (and will always change) only as a result of a click. For this reason, I would prefer to rely on @option-click event. |
Beta Was this translation helpful? Give feedback.
-
|
Here are similar discussions: |
Beta Was this translation helpful? Give feedback.
-
|
After far too long trying to figure out what was going on in my own code, this was a frustrating endpoint. For those looking for any sort of solution: in your And then make sure to also clear the flag on the For 99% of the time, this will work for hour+minute selection. (Obviously, this is far from ideal, but these issues have been sitting for years now, so hopefully this will be someone's "better than nothing.") |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation 1:
I want to:
I consider that:
I do not want user to make an extra click on "Close" button in such situations. I believe that clicking Day/Minute button is sufficient indication that he finished.
Motivation 2:
Pay attention how selecting hour in QTime auto-switches to minutes view.
I want to do similar when user selects day of month, i.e.:
When user selects day of month I want to auto-switch from QDate to QTime, so that user can smoothly continue selecting hours.
Problem:
Current QTime and QDate components are not flexible enough to achieve what I described above.
For example, QTime has only @update:model-value event.
But I do not fill safe to use it for my purpose because it does not say that model change is always the result of button click and never anything else.
Also, I do not find it to be most reliable to compare old and new model to understand what was clicked: minutes or hours.
Solution:
Add @option-click event.
Event should contain:
Beta Was this translation helpful? Give feedback.
All reactions