qt_exclude_from_translation
此属性在 Qt 6.7 中引入。
将此目标属性设置为ON
可将其排除在翻译之外。命令qt_collect_translation_source_targets将跳过此类目标。
要排除子目录下的所有目标,请使用目录属性QT_EXCLUDE_FROM_TRANSLATION。
示例
在下面的示例中,将不会从mytest
目标中提取可翻译字符串。
qt_add_executable(myapp main.cpp) qt_add_executable(mytest test.cpp) set_property(TARGET mytest PROPERTY QT_EXCLUDE_FROM_TRANSLATION ON) qt_add_translations(myapp)
© 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.