org::kde::plasma::extras::ActionTextField

Search for usage in LXR

org::kde::plasma::extras::ActionTextField Class Reference
Inheritance diagram for org::kde::plasma::extras::ActionTextField:

Properties

alias _leftActionsRow
 
alias _rightActionsRow
 
alias focusSequence
 
list QQC2
 
- Properties inherited from org::kde::plasma::components::TextField
bool __effectiveRevealPasswordButtonShown
 
bool __hasBackgroundAndMargins
 
var __isPassword
 
bool clearButtonShown
 
bool revealPasswordButtonShown
 
bool visualFocus
 

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.

Since
2.0 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 2.15 as QQC2
import org.kde.plasma.extras 2.0 as PlasmaExtras
PlasmaExtras.ActionTextField {
id: searchField
placeholderText: "Search…"
focusSequence: StandardKey.Find
rightActions: [
QQC2.Action {
icon.name: "edit-clear"
enabled: searchField.text !== ""
onTriggered: {
searchField.clear()
searchField.accepted()
}
}
]
onAccepted: console.log("Search text is " + searchField.text)
}
Since
5.93
Author
Carl Schwan [email protected][email protected]carl[email protected]schwa[email protected]n.eu

Definition at line 49 of file ActionTextField.qml.

Property Documentation

◆ focusSequence

QtQuick Shortcut sequence org::kde::plasma::extras::ActionTextField::focusSequence
read

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

Since
5.93

Definition at line 57 of file ActionTextField.qml.

◆ QQC2

list org::kde::plasma::extras::ActionTextField::QQC2
read

This property holds a list of actions that will be displayed on the left side of the text field.

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 65 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.
list QQC2
This property holds a list of actions that will be displayed on the left side of the text field.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Jun 6 2023 04:06:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.