Текст документации сгенерирован автоматически из исходного кода.
Если обнаружили ошибку, отправьте об этом сообщение на 📧почту.
StringProperty
Inherits: Property
Class of property that provides input of string value.
Attributes:
- value_changed: str — This signal is emitted when value is changed.
Constructor:
def StringProperty.__init__(default_value: str = '', name: str | LangConstant = tr.UNNAMED, maxlen: int = 32767, input_mask: str | LangConstant = '', placeholder: str | LangConstant = '', re_validator: str | LangConstant = '', 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: str — default value of property
- name: str | LangConstant — name of property
- maxlen: int — maximum length of string
- input_mask: str | LangConstant — validation input mask, see detailed info: https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QLineEdit.html#PySide6.QtWidgets.QLineEdit.inputMask
- placeholder: str | LangConstant — placeholder text
- re_validator: str | LangConstant — regular expression used for validation, see detailed info: https://doc.qt.io/qtforpython-6/PySide6/QtGui/QRegularExpressionValidator.html#PySide6.QtGui.QRegularExpressionValidator
- tooltip: str | LangConstant — tooltip text
- show_reset_btn: bool — state of reset button displaying
Properties
maxlen
Maximum length of string.
Notes: Must be equal or greater than 0.
Returns:
- int — maximum length of string
input_mask
Validation input mask. See detailed info: https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QLineEdit.html#PySide6.QtWidgets.QLineEdit.inputMask
Returns:
- str — validation input mask
re_validator
Regular expression used for validation. See detailed info: https://doc.qt.io/qtforpython-6/PySide6/QtGui/QRegularExpressionValidator.html#PySide6.QtGui.QRegularExpressionValidator
Returns:
- str — regular expression used for validation
name
Property name, this text is displayed in PropertyContainer form editing values.
Returns:
- str | LangConstant — property name
tooltip
Tooltip of the property's widget
Returns:
- str | LangConstant — tooltip text of the property's widget
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
placeholder
default_value
Default value of property
Returns:
- str — default value of property
Methods
get_input_widget
def get_input_widget() -> QWidget
Returns:
- QWidget — (without description)
reset_value
def reset_value() -> None
Returns:
- None — (without description)