Qt6 Qml 中的 CMake 源文件属性

CMake 命令了解以下 CMake 源文件属性:

另请参阅 CMake 属性参考

QT_QMLTC_FILE_BASENAME

指定一个非默认的 .h 和 .cpp 文件名。

QT_QML_GENERATE_ANDROID_JAVA_CLASS

为 Java 代码生成标记 QML 文件。

QT_QML_INTERNAL_TYPE

将 QML 文件标记为提供内部类型。

QT_QML_SINGLETON_TYPE

将 QML 文件标记为提供单例类型。

QT_QML_SKIP_CACHEGEN

禁止将文件编译为字节码。

QT_QML_SKIP_QMLDIR_ENTRY

不让文件作为类型添加到 QML 模块的 typeinfo 文件中。

QT_QML_SKIP_QMLLINT

防止文件包含在自动 qmllint 处理中。

QT_QML_SKIP_TYPE_COMPILER

禁止使用 qmltc 将文件编译为 C++。

QT_QML_SOURCE_TYPENAME

覆盖文件提供的类型名称。

QT_QML_SOURCE_VERSIONS

为类型指定一组自定义版本。

© 2025 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.