-
Suggestion
-
Resolution: Won't Do
-
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.