Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57203

Add signals for interaction with controls

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 5.9.0 Beta 1
    • None
    • Quick: Controls 2
    • 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

          For Gerrit Dashboard: QTBUG-57203
          # Subject Branch Project Status CR V

          Activity

            People

              Unassigned Unassigned
              thohartm Thomas Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes