SearchPopupField QML Type
SearchField with a Popup to show autocompletion entries or search results. More...
Import Statement: | import org.kde.kirigamiaddons.components |
Inherits: | |
Status: | Deprecated |
This type is deprecated. We strongly advise against using it in new code.
Properties
- autoAccept : bool
- delaySearch : bool
- fieldFocus : bool
- popup : Popup
- popupContentItem : Item
- searchField : Kirigami.SearchField
- text : string
Signals
- accepted()
Detailed Description
Use Kirigami.SearchDialog instead.
Can be replaced by the following code:
Kirigami.SearchField { TapHandler { onTapped: { searchDialog.open(); } acceptedButtons: Qt.RightButton | Qt.LeftButton } Keys.onPressed: (event) => { if (event.key !== Qt.Key_Tab || event.key !== Qt.Key_Backtab) { searchDialog.open(); searchDialog.text = text; } } Keys.priority: Keys.AfterItem Kirigami.SearchDialog { id: searchDialog ... } }
See also SearchDialog.
Property Documentation
autoAccept : bool |
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 TextInput works).
delaySearch : bool |
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.
fieldFocus : bool |
This hold the focus state of the internal SearchField.
popup : Popup |
popupContentItem : Item |
This property holds the content item of the popup.
Overflow will be automatically handled as popupContentItem is contained inside a ScrollView.
This is the default element of SearchPopupField.
SearchPopupField { ListView { model: SearchModel {} delegate: QQC2.ItemDelegate {} Kirigami.PlaceholderMessage { id: loadingPlaceholder anchors.centerIn: parent width: parent.width - Kirigami.Units.gridUnit * 4 // ... } } }
searchField : Kirigami.SearchField |
text : string |
This property holds the text of the search field.
Signal Documentation
accepted() |
This signal is triggered when the user trigger a search.
Note: The corresponding handler is onAccepted
.