Edition widgets#
FloatEdit#
Module contains a float editor
- class FloatEdit(parent=None, value=None)[source]#
Bases:
QLineEditField to edit a float value.
The value can be modified with
value()andsetValue().The property
widgetResizable()allow to change the default behaviour in order to automatically resize the widget to the displayed value. UsesetMinimumWidth()to enforce the minimum width.- Parameters:
parent (
QWidget|None) – Parent of the widgetvalue (
float|None) – The value to set the QLineEdit to.
- setValue(value)[source]#
Set the current value of the LineEdit
- Parameters:
value (
float) – The value to set the QLineEdit to.
- widgetResizable()[source]#
Returns whether or not the widget auto resizes itself based on it’s content
- Return type:
bool
IntEdit#
- class IntEdit(parent=None)[source]#
Bases:
QLineEditQLineEdit for integers with a default value and update on validation.
- Parameters:
parent (QWidget)
- sigValueChanged#
Signal emitted when the value has changed (on editing finished)
- getRange()[source]#
Returns the current range of valid values
- Return type:
tuple[int,int]- Returns:
(bottom, top)
- setDefaultValue(value, extend_range=False)[source]#
Set default value when QLineEdit is empty
- Parameters:
value (
int)extend_range (
bool) – True to extend range if needed. False to clip value if needed
- getDefaultValue()[source]#
Return the default value or the bottom one if not set
- Return type:
int|None