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 : alias
- emptyIcon : icon
- emptyText : string
- model : model
- searchFieldLeftActions : list<Action>
- searchFieldPlaceholderText : string
- searchFieldRightActions : list<Action>
- section : alias
- 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() } }
TODO qdoc @image html searchdialog.html
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 : alias |
* @brief 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. * * @since 6.10
emptyIcon : icon |
TODO qdoc
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 : list<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 : list<Action> |
This property holds an alias to the right actions of the search field.
See also ActionTextField::rightActions.
section : alias |
TODO qdoc
This property holds an alias to the section component of the internal ListView.
section.criteria : enumeration |
TODO qdoc
This property holds an alias to the section component of the internal ListView.
section.delegate : Component |
TODO qdoc
This property holds an alias to the section component of the internal ListView.
section.labelPositioning : enumneration |
TODO qdoc
This property holds an alias to the section component of the internal ListView.
section.property : string |
TODO qdoc
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.