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

QAbstractSpinBox not really usefull for custom spin boxes

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Won't Do
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.4.1
    • None

      QAbstractSpinBox is not suitable as a base-class for custom spin boxes. It is for example impossible to create a spin-box for qint64 with similar features like QSpinBox without using the private headers or replicating most of QAbstractSpinBox's implementation.

      The problem is that QAbstractSpinBox already implements most of the logic required for QSpinBox without providing the API for accessing the related functions. An example is handling of suffix and prefix or minimum and maximum. Those properties are respected in size-hints and text-editing but are only provided in the API of the derived classes.

      A possible solution might be to add a new class QVariantSpinBox that provides a QVariant based interface but no or only rudimentary formatting of values/interpretation of text.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jmatokic Johannes Matokic
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes