4.23. Spin widget class

The Spin class inherits QDoubleSpinBox Qt class.

Widget's input value

A float or any object that can be converted to a float.

Widget's attributes

This attribute holds the precision of the spin box, in decimals. The default is 0.
This attribute holds the spin box's prefix. The prefix is prepended to the start of the displayed value.
This attribute holds the suffix of the spin box. The suffix is appended to the end of the displayed value.
This attribute holds the special-value text. If set, the spin box will display this text instead of a numeric value whenever the current value is equal to the minimum value.
This attribute holds whether the spin box is circular. If wrapping is True stepping up from the maximum value will take you to the minimum value and vice versa. The default is False.
This attribute holds the minimum value of the spin box.
This attribute holds the maximum value of the spin box.
This attribute holds the step value. When the user uses the arrows to change the spin box's value the value will be incremented/decremented by the amount of the step. The default value is 1.0.
If set to True the spin box's value will be given as an unicode string. The default is False.
This attribute holds the alignment of the spin box. Possible values are : left, right, top, bottom, center, hcenter, vcenter, justify.
This attribute holds if the spin box is read only. The default is False.

Widget's output value

If decimals is set to 0 the output value is an integer, otherwise the output value is a float.

If text is set to True the output value is an unicode string representing the spin's value.