SearchField

Search for usage in LXR

SearchField Class Reference

Properties

bool autoAccept
 
bool delaySearch
 

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 as Kirigami
Kirigami.SearchField {
id: searchField
onAccepted: console.log("Search text is " + searchField.text)
}

Definition at line 25 of file SearchField.qml.

Property Documentation

◆ autoAccept

bool 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 39 of file SearchField.qml.

◆ delaySearch

bool 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 55 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-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.