SearchDialog QML Type
A dialog to let's you do a global search accross your applications documents, chat rooms and more. More...
Import Statement: | import org.kde.kirigami.dialogs |
Since: | 6.3 |
Inherits: |
Properties
- count : int
- currentItem : Item
- delegate : Component
- emptyHelpfulAction : Action
(since 6.10)
- emptyIcon
- emptyIcon.color : color
- emptyIcon.height : int
- emptyIcon.name : string
- emptyIcon.source : string
- emptyIcon.width : int
- emptyText : string
- model : model
- searchFieldLeftActions : Action
- searchFieldPlaceholderText : string
- searchFieldRightActions : Action
- section
- section.criteria : enumeration
- section.delegate : Component
- section.labelPositioning : enumneration
- section.property : string
- text : string
Detailed Description
Example usage for a chat app where we want to quickly search for a room.
import QtQuick import org.kde.kitemmodels as KItemModels import org.kde.kirigami as Kirigami Kirigami.SearchDialog { id: root onTextChanged: { sortModel.filterText = text; } onAccepted: listView.currentItem.clicked() emptyText: i18nc("Placeholder message", "No room found.") model: KItemModels.KSortFilterProxyModel { id: sortModel sourceModel: RoomModel { } } delegate: RoomDelegate { onClicked: root.close() } Shortcut { sequence: "Ctrl+K" onActivated: root.open() } }
Note: This component is unsuitable on mobile. Instead on mobile prefer to use a seperate page for the search.
Property Documentation
count : int |
This property holds the number of search results displayed in the internal ListView.
currentItem : Item |
This property holds an alias to the currentItem component of the internal ListView.
delegate : Component |
This property holds an alias to the delegate component of the internal ListView.
emptyHelpfulAction : Action |
Helpful action when the list is empty
This property holds an alias to the helpful action of the placeholder message when the internal list view is empty.
This property was introduced in 6.10.
emptyIcon group |
---|
emptyIcon.color : color |
emptyIcon.height : int |
emptyIcon.name : string |
emptyIcon.source : string |
emptyIcon.width : int |
This property holds an alias to the placeholder message icon displayed when the internal list view is empty.
emptyText : string |
This property holds an alias to the placeholder message text displayed when the internal list view is empty.
model : model |
This property holds an alias to the model of the internal ListView.
searchFieldLeftActions : Action |
This property holds an alias to the left actions of the search field.
See also ActionTextField::leftActions.
searchFieldPlaceholderText : string |
The placeholder text shown in the (empty) search field.
searchFieldRightActions : Action |
This property holds an alias to the right actions of the search field.
See also ActionTextField::rightActions.
section group |
---|
section.criteria : enumeration |
section.delegate : Component |
section.labelPositioning : enumneration |
section.property : string |
This property holds an alias to the section component of the internal ListView.
text : string |
This property holds an alias to the content of the search field.