ActionTextField QML Type
Import Statement: | import org.kde.kirigami |
Since: | 5.56 |
Inherits: | |
Inherited By: |
Properties
- focusSequence : keysequence
(since 5.56)
- leftActions : T.Action
(since 5.56)
- rightActions : T.Action
(since 5.56)
Detailed Description
This is advanced textfield. It is recommended to use this class when there is a need to create a create a textfield with action buttons (e.g a clear action).
Example usage for a search field:
import org.kde.kirigami as Kirigami Kirigami.ActionTextField { id: searchField placeholderText: i18n("Search…") focusSequence: StandardKey.Find rightActions: Kirigami.Action { icon.name: "edit-clear" visible: searchField.text.length > 0 onTriggered: { searchField.clear(); searchField.accepted(); } } onAccepted: console.log("Search text is " + searchField.text); }
Property Documentation
focusSequence : keysequence |
This property holds a shortcut sequence that will focus the text field.
This property was introduced in 5.56.
leftActions : T.Action |
This property holds a list of actions that will be displayed on the left side of the text field.
By default this list is empty.
This property was introduced in 5.56.
rightActions : T.Action |
This property holds a list of actions that will be displayed on the right side of the text field.
By default this list is empty.
This property was introduced in 5.56.