This is a template repository for C++/Qt projects that can be deployed to Github Pages.
Deploy example here: QtWasmTemplate.
├── .github/workflows/BuildDeploy.yml # Github Actions workflow for build and deploy to Github Pages
├── CMakeLists.txt # Cmake file
├── CMakePresets.json # Cmake presets file
├── main.cpp # Main cpp file, with qml engine initialization
├── main.qml # Qml file with hello world
└── project.py # Main project script
To use this template, click the "Use this template" button at the top of the repository.
Also you need to activate Github Pages for your repository with Github actions way of deployment.
- Cmake/Ninja
- Qt 6.4.2
- aqtinstall (script for qt installation. optional)
To build this project you can use a script
./project.py --install --build
or you can run commands from script manually:
# Install dependencies
pip install aqtinstall
# Install Qt [optional if you already have Qt installed]
aqt install-qt linux desktop 6.4.2 gcc_64 --outputdir ./Qt
aqt install-qt linux desktop 6.4.2 wasm_32 --outputdir ./Qt
# Configure cmake
cmake --preset=wasm_release -Wno-dev
# Build project
cmake --build --preset=wasm_release
# As result you will get folder, ready to deploy at
# ./build/wasm_release/deploy
If you would like to contribute to this project, please fork the repository and submit a pull request.