https://github.com/savenkovigor/qtwasmtemplate
https://github.com/savenkovigor/qtwasmtemplate
cpp github-pages qml qt qt6 template wasm
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/savenkovigor/qtwasmtemplate
- Owner: SavenkovIgor
- License: mit
- Created: 2023-03-01T20:06:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-18T11:13:30.000Z (about 3 years ago)
- Last Synced: 2025-06-01T10:00:19.310Z (about 1 year ago)
- Topics: cpp, github-pages, qml, qt, qt6, template, wasm
- Language: Python
- Homepage: https://savenkovigor.github.io/QtWasmTemplate/
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Qt Wasm project template, with deploy to Github Pages
This is a template repository for C++/Qt projects that can be deployed to Github Pages.
[](https://github.com/SavenkovIgor/QtWasmTemplate/actions/workflows/BuildDeploy.yml)
Deploy example here: [QtWasmTemplate](https://savenkovigor.github.io/QtWasmTemplate/). :warning: Wait ~20 seconds while it loads the Qt libraries.
## Project structure
```bash
├── .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
```
## Getting Started
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.
## Dependencies
- Cmake/Ninja
- Qt 6.5.1
- aqtinstall (script for qt installation. optional)
## :hammer_and_wrench: Build
To build this project you can use a script
```bash
./project.py --install --build
```
or you can run commands from script manually:
```bash
# Install dependencies
pip install aqtinstall
# Install Qt [optional if you already have Qt installed]
aqt install-qt linux desktop 6.5.1 gcc_64 --outputdir ./Qt
aqt install-qt linux desktop 6.5.1 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
```
## Contributing
If you would like to contribute to this project, please fork the repository and submit a pull request.