Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
None
-
None
Description
Add signals for interaction with controls
I propose the following signals:
- toggled for AbstractButton
- sliderMoved to Slider
- dialMoved to Dial
- textEdited to TextField (or even TextInput directly)
All of these signals should be implemented like in widgets and only be emitted when a user interaction happened. See e.g. QLineEdit::textEdited.
SpinBox should have a similar signal, but QAbstractSpinBox is missing one.
I propose valueEdited.
This makes it easier to update a property in the backend if and only if the user changes a control.
This avoids subtle bugs when e.g. a control rounds the value of the backend and pushes back the rounded value to the backend, because the front end code does not distinguish between a change of the value and an interactive change from the user.
Attachments
Issue Links
- relates to
-
QTBUG-67311 Give RangeSlider an equivalent to Slider's moved() signal
- Closed
For Gerrit Dashboard: QTBUG-57203 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
178178,4 | Add Slider::moved() signal | dev | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |
178195,3 | Add Dial::moved() signal | dev | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |
178205,4 | Add AbstractButton::toggled() signal | dev | qt/qtquickcontrols2 | Status: MERGED | -2 | 0 |
178425,3 | Add TextInput::textEdited() | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
178783,4 | Add QQuickSpinBox::valueModified() | dev | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |