QT_EXCLUDE_FROM_TRANSLATION
이 속성은 Qt 6.7에서 도입되었습니다.
이 디렉터리 속성을 ` ON `로 설정하면 해당 디렉터리와 그 하위 디렉터리에 있는 모든 타깃을 번역에서 제외할 수 있습니다. ` qt_collect_translation_source_targets() ` 명령은 이러한 타깃을 건너뜁니다.
단일 타깃을 제외하려면 타깃 속성 QT_EXCLUDE_FROM_TRANSLATION을 사용하십시오.
예시
다음 예제에서는 tests 디렉터리에 정의된 타깃에서 번역 가능한 문자열이 추출되지 않습니다.
add_subdirectory(app)
add_subdirectory(tests)
set_property(DIRECTORY tests PROPERTY QT_EXCLUDE_FROM_TRANSLATION ON)
qt_add_translations(myapp)또는 CMakeLists.txt 의 tests 하위 디렉터리에 directory 속성을 설정할 수도 있습니다.
# tests/CMakeLists.txt
qt_add_executable(...)
add_test(...)
set_directory_properties(PROPERTIES QT_EXCLUDE_FROM_TRANSLATION ON)QT_EXCLUDE_SOURCES_FROM_TRANSLATION도 참조하십시오 .
© 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.