QT_EXCLUDE_FROM_TRANSLATION

該特性在 Qt 6.7 引入。

Set this target property to ON to exclude it from translation. The command qt_collect_translation_source_targets will skip such targets.

To exclude all targets under a subdirectory, use the directory property QT_EXCLUDE_FROM_TRANSLATION .

範例

In the following example, translatable strings will not be extracted from the 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)
					

另請參閱 QT_EXCLUDE_SOURCES_FROM_TRANSLATION .

內容

  1. 範例