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).

For common pattern like, a search field or a password field, prefer using the more specifig org::kde::extras::SearchField or org::kde::extras::PasswordField.

Example usage for a search field:

import QtQuick.Controls as QQC2
import org.kde.plasma.extras as PlasmaExtras
PlasmaExtras.ActionTextField {
id: searchField
placeholderText: "Search…"
focusSequence: StandardKey.Find
QQC2.Action {
icon.name: "edit-clear"
enabled: searchField.text !== ""
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.
Since
5.93
Author
Carl Schwan carl@.nosp@m.carl.nosp@m.schwa.nosp@m.n.eu

Definition at line 47 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.93

Definition at line 55 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.93

Definition at line 63 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.93

Definition at line 71 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 Mon Nov 18 2024 12:10:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.