This repo produce a Qt application that allows to run Qml code interactively. The resulting application can access QML types defined in C++. The purpose of this repo is to show online some C++/Qt/Qml projects. For doing that the repo contains a wasm folder that produce a web page, integrating a JavaScript code editor to the compiled Qt application of this repo. The integration is made by compiling the Qt application to Webassembly.
Clone the repo
git clone git@github.com:EddyTheCo/qmlonline.git qmlonline
Create build directory and build from there.
mkdir build
cd build
Qt../wasm_../bin/qt-cmake -DCMAKE_BUILD_TYPE=Release ../qmlonline/
cmake --build .
If everything went well, the corresponding WASM file and Qt-JavaScript Api should be updated on the qmlonline/wasm source directory.
cd ../qmlonline/wasm
emrun index.html
It is necessary to have installed Qt for WebAssembly.
- The general programming idea was taken from QML Online.
- The embeddable code editor in JavaScript is supported by Ace JavaScript sources.