We use the manifest mode vcpkg.json
to declare dependencies, just like package.json
for npm. Clone the repo with vcpkg submodules using:
git clone --recurse-submodules https://github.com/upupming/vscode-qt-qml-vcpkg-template.git
Or run the following command after cloned the repo:
git submodule update --init
- Debugging, Intelligence & Code formatting on VSCode is much more faster
- Run
windeployqt
on the fly. - Automatically build Release zip with GitHub Actions.
- Cache all packages and get faster package installing speed on CI.
- Use Ninja generator for faster build time, just as faster as the Qt Creator.
- No QML intelligence on VSCode, you can still use Qt Creator to write QML files.
-
Clone the repo.
git clone --recurse-submodules https://github.com/upupming/vscode-qt-qml-vcpkg-template.git
-
Install latest visual studio 2019 with msvc compiler.
-
Download Qt Installer and install latest Qt (current is
5.15.2
&msvc2019_64
). qt5 installed with vcpkg cannot build QML app now, so we manually install Qt. -
Global search
vscode-qt-qml-vcpkg-template
,C:/Qt/5.15.2/msvc2019_64
andMicrosoft Visual Studio/2019/Community
etc., ans replace them according your own condition. -
Run the
CMake Configure
task or CMake Tools' Configure command. -
If you build the exe for the first time, you must run
Run windeployqt
task to copy all necessary Qt libraries to the exe folder. Or the exe will crash on launch! -
Change the
main.cpp
and useF5
or debug button on the left side bar to see the results. VSCode will run CMake to build the exe on each debug session.- We use
CMake Build
task to build the exe. CMake Tools' Build command (F7
) is the same.
- We use
-
Run the
release.bat
to build and get a release zip file at any time.