qt_qmllint_context_property_dump
启用在 lint 目标中转储上下文属性。
该变量在 Qt 6.11 中引入。
启用QT_QMLLINT_CONTEXT_PROPERTY_DUMP 变量后,由qt_add_qml_module创建的linting target将在运行qmllint 之前运行qmlcontextpropertydump。这允许qmllint对 QML 中上下文属性的使用发出警告。
要启用此功能,请使用以下方法之一设置QT_QMLLINT_CONTEXT_PROPERTY_DUMP 变量:
- 将该选项传递给 CMake 可执行文件:
-DQT_QMLLINT_CONTEXT_PROPERTY_DUMP=ON
- 在首次调用qt_add_qml_module 之前,将设置添加到
CMakeLists.txt文件:set(QT_QMLLINT_CONTEXT_PROPERTY_DUMP ON)
© 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.