Qt VS Tools includes MSBuild rules and targets specific to Meta-Object Compiler (moc), User Interface Compiler (uic), and Resource Compiler (rcc). These rules are referred to as Qt/MSBuild. They enable running moc, rcc and uic in parallel processes and setting build options, such as selecting project items to process and the tools to process them. Further, source files that the Qt tools generate are added to the C++ compilation during the build process, so you do not need to include generated files in projects.
You can set options for each Qt tool either globally at project level or for specific files. To set global options for handling files at project level:
- Select Properties in the context menu of the project.
- Select Extensions > Qt VS Tools > Qt Project Settings.
To set options for handling a specific file, select Properties in the context menu of the file. Only tools relevant for the file type are listed. For example, moc options are available for C++ source and header files, whereas uic options are available for UI forms (.ui).
Project File Format
When importing .pro files, custom build steps are automatically converted into Qt/MSBuild steps. To convert custom build steps into Qt/MSBuild steps for a solution, select Qt > Convert custom build steps to Qt/MSBuild in the context menu of the solution.
The Qt/MSBuild project format has changed between Qt VS Tools versions, and therefore you might have to manually update project files of imported projects. For more information about Qt/MSBuild project format versions, see Qt VS Tools - Project format versions.
Path to Build Files
To set the path to the Qt/MSBuild files, select Extensions > Qt VS Tools > Options > Qt/MSBuild. This corresponds to setting the value of the
QTMSBUILDS environment variable.
© 2022 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.