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

Q(Double)SpinBox: add signal returnPressed()

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.2.2, 5.15
    • None
    • All

    Description

      QSpinBox (QDoubleSpinBox) should provide a signal returnPressed(), just like QLineEdit does.

       

      Pressing the return/enter key in spinboxes is often used to confirm+trigger any actions.

      setKeyboardTracking(false) + signal valueChanged/textChanged is not convenient for this purpose, because the signals are also emitted when keyboard focus is lost, or when other spinbox functionality is used (in which case the entered value usually can/should not be interpreted as "confirmed").

       

      Q(Double)SpinBox internally uses a line edit, so all that (likely) needs to be done is to pass QLineEdit::returnPressed() on.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            comer352l comer352l
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes