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:

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
KDE Frameworks 5.56

Definition at line 41 of file ActionTextField.qml.

Property Documentation

◆ _leftActionsRow

alias org::kde::kirigami::ActionTextField::_leftActionsRow
read

Definition at line 65 of file ActionTextField.qml.

◆ _rightActionsRow

alias org::kde::kirigami::ActionTextField::_rightActionsRow
read

Definition at line 67 of file ActionTextField.qml.

◆ focusSequence

alias org::kde::kirigami::ActionTextField::focusSequence
read

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

Since
KDE Frameworks 5.56

Definition at line 47 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
KDE Frameworks 5.56

Definition at line 55 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
KDE Frameworks 5.56

Definition at line 63 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 Thu Nov 30 2023 04:01:11 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.