- Qt Creator Documentation
- Search in projects or file systems
- Qt Creator 20.0.0

Search in current file ◦ Turn on Silver Searcher

# Search in projects or file systems

To search in projects or file systems in the Search Results view:

- Select Ctrl+Shift+F
- Go to Edit > Find/Replace > Advanced Find, and select Open Advanced Find.
- Go to the Search Results view.

The search scope and search criteria determine where Qt Creator looks for the search string, how it matches the string with text, and which results it shows.

## Search in a single project

1. In Scope, select Single Project.

2. In Search for, enter the string you are looking for.
3. Select options to make the search case sensitive, search only whole words, use regular expressions, or ignore binary or generated files.
4. In Project, select an open project to search in. Select Current to search in the project that the currently active file belongs to.
5. In File pattern, specify file patterns to restrict the search to files that match the pattern. For example, to search for a string only in `.cpp` and `.h` files, enter `*.cpp,*.h`.
6. In Exclusion pattern, specify file patterns to omit files from the search.
7. Select Search.

If you cannot find some files, see Specify project contents for how to declare them as a part of the project.

## Search in all projects

1. In Scope, select All Projects.

2. Set search criteria.
3. Select Search.

## Search in the file system

In addition to the options available for searching from all projects, you can select the search engine to use and the directory to search in.

1. In Scope, select Files in File System.

2. In Search for, enter the string you are looking for.
3. In Search engine, select the search engine to use:
   - Select Internal to use the Qt Creator search engine.
   - Select Git Grep to use Git to only search tracked files in the Git work tree. To restrict the search to the HEAD, a tag, a local or remote branch, or a commit hash, enter a reference. Leave the field empty to search through the file system.
   - Select Silver Searcher to use the experimental Silver Searcher plugin.
4. In Directory, select the directory to search in. Select Browse to locate the directory or Current to search in the directory where the currently active file is.
5. Select Search.

## Search and replace

To replace occurrences of the existing text:

1. Select Search & Replace.

2. Enter the new text in Replace with.
3. Select Replace.

To preserve the case of the original text when replacing, select Preserve case. The rules listed in Preserve case when replacing apply here as well.

See also How to: Search, Find symbols, Search in current file, and Turn on Silver Searcher.