FormTextFieldDelegate QML Type
A Form delegate that corresponds to a text field. More...
Import Statement: | import org.kde.kirigamiaddons.formcard |
Inherits: |
Properties
- acceptableInput : bool
- cursorPosition : int
- echoMode : enumeration
- fieldActiveFocus : bool
- inputMethodHints : enumeration
- label : string
- maximumLength : int
- placeholderText : string
- readOnly : bool
- status : var
- statusMessage : string
- trailing : alias
- validator : Validator
Signals
Methods
Detailed Description
FormCard.FormHeader { title: "Information" } FormCard.FormCard { FormCard.FormTextFieldDelegate { label: "Account name" } FormCard.FormTextFieldDelegate { label: "Password" statusMessage: "Password incorrect" status: Kirigami.MessageType.Error echoMode: TextInput.Password text: "666666666" } FormCard.FormTextFieldDelegate { label: "Password" statusMessage: "Password match" text: "4242424242" status: Kirigami.MessageType.Positive echoMode: TextInput.Password } }
Property Documentation
acceptableInput : bool |
This property holds the acceptableInput of the internal TextField.
cursorPosition : int |
This property holds the cursorPosition of the internal TextField.
This property holds the position of the cursor in the text field. A value of 0 indicates that the cursor is at the beginning of the text field.
This property allows you to programmatically control and access the cursor position within the text field, which can be useful for integrating the FormTextFieldDelegate component into your project.
See also TextInput.cursorPosition.
echoMode : enumeration |
This property holds the echoMode of the internal TextField.
This consists of how the text inside the text field will be displayed to the user.
See also TextInput.echoMode.
fieldActiveFocus : bool |
The activeFocus state of the internal TextField.
inputMethodHints : enumeration |
This property holds the inputMethodHints of the internal TextField.
This consists of hints on the expected content or behavior of the text field, be it sensitive data, in a date format, or whether the characters will be hidden, for example.
See also inputMethodHints.
label : string |
A label containing primary text that appears above and to the left the text field.
maximumLength : int |
The maximumLength of the text inside the TextField if maxLength > 0.
placeholderText : string |
This property holds the placeholderText of the internal TextField.
This consists of secondary text shown by default on the text field if no text has been written in it.
status : var |
This property holds the current status message type of the text field.
This consists of an inline message with a colorful background and an appropriate icon.
The status property will affect the color of statusMessage used.
Accepted values:
Constant | Description |
---|---|
Kirigami.MessageType.Information | (blue color) |
Kirigami.MessageType.Positive | (green color) |
Kirigami.MessageType.Warning | (orange color) |
Kirigami.MessageType.Error | (red color) |
Default: Kirigami.MessageType.Information if statusMessage is set, nothing otherwise.
See also Kirigami.MessageType.
statusMessage : string |
This property holds the current status message of the text field.
If this property is not set, no status will be shown.
trailing : alias |
This property holds child items to be displayed on the right of the text field.
Signal Documentation
accepted() |
editingFinished() |
This signal is emitted when the Return or Enter key is pressed or the text input loses focus.
Note that if there is a validator or inputMask set on the text input and enter/return is pressed, this signal will only be emitted if the input follows the inputMask and the validator returns an acceptable state.
Note: The corresponding handler is onEditingFinished
.
textEdited() |
This signal is emitted whenever the text is edited.
Unlike textChanged(), this signal is not emitted when the text is changed programmatically, for example, by changing the value of the text property or by calling clear().
Note: The corresponding handler is onTextEdited
.
Method Documentation
clear() |
Clears the contents of the text input and resets partial text input from an input method.
insert(position, text) |
Inserts text into the TextInput at position.
select(start, end) |
Causes the text from start to end to be selected.
selectAll() |
Causes all text to be selected.