QML 静态分析教程

本教程将介绍QQmlSA ,这是一个用于静态分析 QML 代码的 API。

通过本教程的各个步骤,我们将学习如何设置一个基本的 qmllint 插件,创建自己的自定义分析阶段,并添加对 fixit-hints 的支持。

第一章从一个最简插件开始,后续章节将介绍新的概念。

本教程的源代码位于examples/qmlcompiler/tutorials/helloworld 目录中。

教程章节:

  1. 基本设置
  2. 自定义分析阶段
  3. Fixit提示

© 2026 The Qt Company Ltd. 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.