Текст документации сгенерирован автоматически из исходного кода.
Если обнаружили ошибку, отправьте об этом сообщение на 📧почту.
FloatProperty
Inherits: Property
Class of property that provides input of float value.
Attributes:
- value_changed: float — This signal is emitted when value is changed.
Constructor:
def FloatProperty.__init__(default_value: float = 0.0, name: str| LangConstant = tr.UNNAMED, minimum: float = 0.0, maximum: float = 10.0, single_step: float = 1.0, decimals: int = 2, tooltip: str | LangConstant = '', show_reset_btn: bool = True)
Initializes class of property.
The description of the arguments is identical to the description of the parameters with the same names.
Parameters:
- default_value: float — default value of property
- name: str| LangConstant — property name
- minimum: float — minimum value
- maximum: float — maximum value
- single_step: float — single step
- decimals: int — precision of the spin box, in decimals
- tooltip: str | LangConstant — tooltip text
- show_reset_btn: bool — state of reset button displaying
Properties
value
@property def value() -> float
Returns:
- float — (without description)
minimum
Minimum value.
Notes: Must be less than [maximum]
Returns:
- float — minimum value
maximum
Maximum value.
Notes: Must be greater than [minimum]
Returns:
- float — maximum value
single_step
This property 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 singleStep.
Notes: Must be greater than 0
Returns:
- float — single step
decimals
Holds the precision of the spin box, in decimals Sets how many decimals the spinbox will use for displaying and interpreting doubles.
Returns:
- int — decimals
tooltip
Tooltip of the property's widget
Returns:
- str | LangConstant — tooltip text of the property's widget
name
Property name, this text is displayed in PropertyContainer form editing values.
Returns:
- str | LangConstant — property name
show_reset_btn
State of reset button displaying. This button is displayed if value isn't equal to default value.
Returns:
- bool — state of reset button displaying
default_value
Default value of property
Returns:
- float — default value of property
Methods
get_input_widget
def get_input_widget() -> QDoubleSpinBox
Returns:
- QDoubleSpinBox — (without description)