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

Q(Double)SpinBox: add signal returnPressed()

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 5.15, 6.2.2
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      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

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes