搜索结果视图

搜索范围决定Qt Creator 在何处搜索搜索字符串:

  • All Projects 在所有项目中搜索。
  • Current Project 在当前活动项目中搜索。
  • Files in All Project Directories 递归搜索所有项目目录。
  • Files in File System 递归搜索选定目录。
  • Current File 只搜索当前文件。
  • Open Documents 在所有打开的文件中搜索。

File patternExclusion pattern 中,指定文件模式以进一步限制搜索范围。

搜索条件决定了Qt Creator 如何将搜索字符串与文本匹配,以及显示哪些结果:

  • 要考虑大小写,请选择Case sensitive
  • 要只搜索整词,请选择Whole words only
  • 要使用regular expressions 进行搜索,请选择Use regular expressions
  • 要从搜索结果中排除二进制文件,请选择Ignore binary files

带搜索选项的搜索结果视图

查看搜索结果

选择SearchSearch & Replace 后,视图会显示有搜索结果的文件列表。

在搜索结果中找到匹配项

在编辑器中显示搜索结果:

  • 要查看文件中的所有搜索结果,请双击列表中的文件名。
  • 要转到某个出现点,双击该出现点。

例如,要在对列出的文件进行更改后重复搜索,请选择Search Again

搜索结果视图工具栏

工具栏包含用于再次搜索和浏览搜索结果的选项:

  • 要清除搜索结果,请选择清晰 (Clear)。
  • 要在实例之间移动,请选择下一个项目 (Next Item) 和上一个项目 (Previous Item)。
  • 要展开和折叠搜索结果,请选择全部展开 (Expand All)。
  • 要根据访问类型(如读、写或声明)过滤符号用法的搜索结果,请选择过滤树 (Filter Tree)。
  • 要开始新的搜索,请选择新搜索 (New Search)。
  • 如果活动项目的路径较长,请选择../ (Show Paths in Relation to Active Project) 以显示相对路径。
  • 要显示以前的搜索结果,请在History 中选择它们。

另请参阅 " 查看输出"和"如何:搜索"

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.