Register Qt installations
To develop with Qt, you need at least one Qt version. You can install Qt in many ways:
- Use Qt Online Installer
- Use a package manager
- Build Qt from sources
Automatic registration
Qt Extension for VS Code checks whether you have a Qt installation folder at the default path and offers to save it in Qt settings. Select Use to save it and to register the Qt versions in it.
Also, if you install Qt from vcpkg
, Qt Extension for VS Code detects it and offers to create a CMake kit for it. It then uses tools, such as Qt Widgets Designer, and paths from vcpkg
. Set the QT_QPA_PLATFORM_PLUGIN_PATH
and QML_IMPORT_PATH
environment variables in the launch.json file to configure the Qt installation.
If you did not install Qt at the default path, or the vcpkg
installation is not detected automatically, register your Qt versions as described in the following sections.
Qt Online Installer installations
To register a Qt that you installed with Qt Online Installer to a folder that is not on the default path:
- Go to Command Palette, and select Qt: Register Qt Installation.
- Select the folder where you installed Qt, and then select Select the Qt installation path.
The command creates CMake kits for each installed Qt version.
Other installations
To register a Qt that you installed from a package manager or that you built from sources:
- Go to Command Palette, and select Qt: Register Qt (qtpaths or qmake).
- Select the
qmake
orqtpaths
executable, and then select Select.
The command creates a CMake kit for qtpaths.
Scan for Qt kits
If some Qt CMake kits are missing, go to Command Palette and select Qt: Scan for Qt Kits.
© 2024 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.