- Extending Qt Creator Manual
- QtCreator
- SearchResultWindow
- Extending Qt Creator Manual 12.0.0-beta1

# SearchResultWindow Class

class Core::SearchResultWindow

The SearchResultWindow class is the implementation of a commonly shared Search Results output pane. More...

Header: | #include <coreplugin/find/searchresultwindow.h>
Inherits: | Core::IOutputPane

- List of all members, including inherited members

## Detailed Description

Whenever you want to show the user a list of search results, or want to present UI for a global search and replace, use the single instance of this class.

In addition to being an implementation of an output pane, the SearchResultWindow has functions and enums that enable other plugins to show their search results and hook into the user actions for selecting an entry and performing a global replace.

Whenever you start a search, call startNewSearch(SearchMode) to initialize the Search Results output pane. The parameter determines if the GUI for replacing should be shown. The function returns a SearchResult object that is your hook into the signals from user interaction for this search. When you produce search results, call addResults() or addResult() to add them to the Search Results output pane. After the search has finished call finishSearch() to inform the Search Results output pane about it.

You will get activated() signals via your SearchResult instance when the user selects a search result item. If you started the search with the SearchAndReplace option, the replaceButtonClicked() signal is emitted when the user requests a replace.