ActionTextField

Search for usage in LXR

ActionTextField Class Reference
Inheritance diagram for ActionTextField:

Properties

alias focusSequence
 
listTAction leftActions
 
listTAction rightActions
 

Additional Inherited Members

- Public Member Functions inherited from QtQuick.Controls.TextField
 pressAndHold (MouseEvent event)
 
 pressed (MouseEvent event)
 
 released (MouseEvent event)
 

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);
}
alias focusSequence
This property holds a shortcut sequence that will focus the text field.
listTAction rightActions
This property holds a list of actions that will be displayed on the right side of the text field.
void clear()
Since
5.56

Definition at line 42 of file ActionTextField.qml.

Property Documentation

◆ focusSequence

alias ActionTextField::focusSequence
read

This property holds a shortcut sequence that will focus the text field.

Since
5.56

Definition at line 48 of file ActionTextField.qml.

◆ leftActions

listTAction ActionTextField::leftActions
read

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.

Since
5.56

Definition at line 56 of file ActionTextField.qml.

◆ rightActions

listTAction ActionTextField::rightActions
read

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.

Since
5.56

Definition at line 64 of file ActionTextField.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.