SearchBar QML Type | Fluid Reference Documentation

- Fluid Reference Documentation
- Fluid 1.0.0

# SearchBar QML Type

Provides a searchbar, that supports autocompletion and displays search results using cards. More...

Import Statement: | import Fluid.Controls 1.0

- List of all members, including inherited members

## Properties

- cardWidth : int
- expanded : alias
- model : any
- persistent : bool
- searchPlaceHolder : string
- searchResults : var
- searchSuggestions : alias
- searchText : string
- suggestionDelegate : alias
- suggestionTextRole : string
- suggestionsHeight : int
- waveColor : color

## Signals

- search(string query)

## Methods

- close()
- open()

## Detailed Description

## Property Documentation

cardWidth : int

The width of the search card. By default the search bar centers in the parent with a margin of 64 each side

[read-only] expanded : alias

Whether the SearchBar is currently open

model : any

The suggestions to display.

See also SearchBar::suggestionTextRole and SearchBar::suggestionDelegate.

persistent : bool

Whether the SearchBar is persistent or expandable

searchPlaceHolder : string

The string to display when the search field is empty

searchResults : var

The model containing the search results

searchSuggestions : alias

The suggestions to display.

See also SearchBar::suggestionTextRole and SearchBar::suggestionDelegate.

searchText : string

The current search text in the search bar typed in so far.

suggestionDelegate : alias

The delegate item for the suggestion list view.

See also searchSuggestions.

suggestionTextRole : string

The model type that contains the text to display in the suggestion delegate

See also searchSuggestions.

suggestionsHeight : int

The viewable area of the suggestions list until it begins scrolling.

waveColor : color

The background color of the expanded search bar.

## Signal Documentation

search(string query)

Is emitted, when the user searches for a query. The query parameter contains the search query as string. Use this signal to provide search results.

## Method Documentation

close()

Closes the search bar

open()

Opens the search bar