Qt6 LinguistTools 中的 CMake 命令

当加载 Qt6::LinguistTools 时(例如通过

find_package(Qt6 REQUIRED COMPONENTS LinguistTools)

另请参阅 《CMake 命令参考》。

qt_add_lrelease

添加目标,用于将Qt Linguist 中的 .ts 文件转换为 .qm 文件。

qt_add_lupdate

添加目标,用于生成或更新Qt Linguist.ts 文件。

qt_add_translation

将Qt Linguist 的 .ts 文件编译为 .qm 文件。

qt_add_translations

添加目标,以更新并转换Qt Linguist.ts 文件为 .qm 文件。

qt_collect_translation_source_targets

收集符合翻译条件的目标。

qt_create_translation

设置Qt Linguist 翻译工具链。

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