To search through the currently open file:
If the text is found, all occurrences are highlighted as you type.
(
Find Next
), or press
F3
. To go to the previous occurrence click
(
Find Previous
), or press
Shift+F3
.
You can restrict the search in the Find field by selecting one or several search criteria:
注意: If you have selected text before selecting Find/Replace , the search is conducted within the selection.
To replace occurrences of the existing text, enter the new text in the Replace with field.
The Preserve Case when Replacing option can be selected to preserve the case of the original text when replacing. This option is not compatible with the Use Regular Expressions search option, and will thus be disabled when regular expressions are used. When the option is used, the case of the occurrence will be conserved, according to the following rules:
The locations of search hits, breakpoints, and bookmarks in your document are highlighted on the editor scroll bar. To turn highlighting off, select 工具 > Options > 文本编辑器 > Display > Highlight search results on the scrollbar .
To search through projects, files on a file system or currently open files:
在 Search engine field, select the search engine to use:
.cpp
and
.h
files, enter
*.cpp,*.h
.
A list of files containing the searched text is displayed in the Search Results pane.
The search results are stored in the search history from which you can select earlier searches.
To clear the search results, select the
(
Clear
) button.
To start a new search, select the
(
New Search
) button.
注意: 可以使用 Advanced Find also to search for symbols. For more information, see Finding Symbols .
You can use Silver Searcher as a search engine in Qt Creator if you install Silver Searcher on the development PC and enable the experimental plugin.
To use Silver Searcher:
You might have to build Silver Searcher from sources for some platforms.
You can use the experimental Clang Refactoring plugin to explore the Clang AST using AST matcher expressions. For more information about constructing matcher expressions, see AST Matcher Reference .
To explore the AST:
You can view the results of the query as links to code positions in the Search Results output pane.