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

Q(Double)SpinBox: add signal returnPressed()

XMLWordPrintable

    • All
    • 697aad4b8 (dev)

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes