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. The dialog lists only tools relevant for the file type. For example, moc options are available for C++ source and header files, whereas uic options are available for UI forms (.ui).
The Qt/MSBuild project file format has changed between Qt VS Tools versions. Currently, version 3 and later are supported.
If you open an existing solution that has version 1 project format, you can still build it. If it has version 2 format, you can build it if you set additional command line options and set the default Qt version to the Qt version that you initially created the project for.
When you load .pro files, Qt VS Tools automatically converts custom build steps into Qt/MSBuild steps.
For more information about Qt/MSBuild project format versions, see Qt VS Tools - Project format versions.
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.
© 2023 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.