edifice.TextInput#
- class edifice.TextInput(text='', placeholder_text=None, on_change=None, on_edit_finish=None, **kwargs)[source]#
Bases:
QtWidgetElement
Basic widget for a one line text input.
Underlying Qt Widget QLineEdit
- Parameters:
text (
str
) – Initial text of the text input.placeholder_text (
Optional
[str
]) – “makes the line edit display a grayed-out placeholder text as long as the line edit is empty.” See placeHolderTexton_change (
Optional
[Callable
[[str
],Optional
[Awaitable
[None
]]]]) – Event handler for when the value of the text input changes, but only when the user is editing the text, not when the text prop changes.on_edit_finish (
Optional
[Callable
[[],Optional
[Awaitable
[None
]]]]) – Callback for the editingFinished event, when the Return or Enter key is pressed, or if the line edit loses focus and its contents have changed
Methods
__init__
([text, placeholder_text, ...])register_ref
(reference)Registers provided
Reference
to this Element.set_key
(key)Sets the key of the Element.
Attributes
children
The children of this Element.
props
The props of this Element.
underlying
The underlying QWidget, which may not exist if this Element has not rendered.