QT_WRAP_UI

.ui 파일의 소스를 생성합니다.

이 명령은 Qt6 패키지의 Widgets 구성 요소에 정의되어 있습니다. 패키지를 로드합니다:

find_package(Qt6 REQUIRED COMPONENTS Widgets)

시놉시스

qt_wrap_ui(<VAR> ui_file1 [ui_file2 ...]
           [OPTIONS ...])

버전 없는 명령이 비활성화되어 있으면 qt6_wrap_ui() 을 대신 사용합니다. 이 명령은 이 명령과 동일한 인수 집합을 지원합니다.

설명

지정된 .ui 파일에서 User Interface Compiler (uic) 를 호출하기 위한 규칙을 만듭니다. 각 입력 파일에 대해 헤더 파일이 빌드 디렉터리에 생성됩니다. 생성된 헤더 파일의 경로는 <VAR> 에 추가됩니다.

참고: 이것은 저수준 매크로입니다. uic 을 사용하여 .ui 파일을 처리하는 더 편리한 방법은 CMake AUTOUIC 설명서를 참조하세요.

6.8부터:

참고: .ui 파일을 처리하는 방법은qt_add_ui를 권장합니다.

옵션

uic 호출에 추가할 OPTIONS 을 설정할 수 있습니다. 가능한 옵션은 uic 문서에서 찾을 수 있습니다.

예제

set(SOURCES mainwindow.cpp main.cpp)
qt_wrap_ui(SOURCES mainwindow.ui)
qt_add_executable(myapp ${SOURCES})

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