qt5_wrap_ui(<VAR> ui_file1 [ui_file2 ...] [OPTIONS ...])
Creates rules for calling
uic (用户界面编译器)
在给定
.ui
files. For each input file, an header file is generated in the build directory. The paths of the generated header files are added to
<VAR>
.
注意:
This is a low-level macro. See the
CMake AUTOUIC Documentation
for a more convenient way to process
.ui
files with
uic
.
可以设置额外
选项
应该被添加到
uic
调用。可以查找可能的选项在
uic documentation
.
set(SOURCES mainwindow.cpp main.cpp) qt5_wrap_ui(SOURCES mainwindow.ui) add_executable(myapp ${SOURCES})