org::kde::kirigami::ActionTextField

Search for usage in LXR

org::kde::kirigami::ActionTextField Class Reference
Inheritance diagram for org::kde::kirigami::ActionTextField:

Properties

alias _leftActionsRow
 
alias _rightActionsRow
 
alias focusSequence
 
list< QtObject > leftActions
 
list< QtObject > rightActions
 

Additional Inherited Members

- Public Member Functions inherited from QtQuick.Controls.TextField
 accepted ()
 
void copy ()
 
void cut ()
 
void deselect ()
 
 editingFinished ()
 
string getText (int start, int end)
 
void insert (int position, string text)
 
bool isRightToLeft (int start, int end)
 
void paste ()
 
 pressAndHold (event)
 
 pressed (event)
 
void redo ()
 
 released (event)
 
void remove (int start, int end)
 
void select (int start, int end)
 
void selectAll ()
 
void selectWord ()
 
void undo ()
 

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 2.20 as Kirigami
Kirigami.ActionTextField {
id: searchField
placeholderText: i18n("Search...")
focusSequence: StandardKey.Find
rightActions: Kirigami.Action {
icon.name: "edit-clear"
visible: searchField.text !== ""
onTriggered: {
searchField.clear();
searchField.accepted();
}
}
onAccepted: console.log("Search text is " + searchField.text);
}
Since
5.56

Definition at line 42 of file ActionTextField.qml.

Property Documentation

◆ focusSequence

alias org::kde::kirigami::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

list<QtObject> org::kde::kirigami::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

list<QtObject> org::kde::kirigami::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:
alias focusSequence
This property holds a shortcut sequence that will focus the text field.
QString i18n(const char *text, const TYPE &arg...)
list< QtObject > rightActions
This property holds a list of actions that will be displayed on the right side of the text field.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:14:24 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.