org::kde::kirigami::SearchField

Search for usage in LXR

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

Properties

bool autoAccept
 
bool delaySearch
 
- Properties inherited from org::kde::kirigami::ActionTextField
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 a standard TextField following the KDE HIG, which, by default, uses Ctrl+F as the focus keyboard shortcut and "Search…" as a placeholder text.

Example usage for the search field component:

import org.kde.kirigami 2.20 as Kirigami
Kirigami.SearchField {
id: searchField
onAccepted: console.log("Search text is " + searchField.text)
}

Definition at line 26 of file SearchField.qml.

Property Documentation

◆ autoAccept

bool org::kde::kirigami::SearchField::autoAccept
read

This property sets whether the accepted signal is fired automatically when the text is changed.

Setting this to false will require that the user presses return or enter (the same way a QtQuick.Controls.TextInput works).

default: true

Since
5.81
org.kde.kirigami 2.16

Definition at line 40 of file SearchField.qml.

◆ delaySearch

bool org::kde::kirigami::SearchField::delaySearch
read

This property sets whether to delay automatic acceptance of the search input.

Set this to true if your search is expensive (such as for online operations or in exceptionally slow data sets) and want to delay it for 2.5 seconds.

Note
If you must have immediate feedback (filter-style), use the text property directly instead of accepted()

default: false

Since
5.81
org.kde.kirigami 2.16

Definition at line 56 of file SearchField.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:14:25 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.