Skip to content

EddyTheCo/qmlonline

Repository files navigation

QmlOnline

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.

Compile the WASM file and Qt-JavaScript Api

The project uses CMake presets as a way to share CMake configurations. Refer to cmake, ctest and cpack documentation for more information on the use of presets.

If everything went well, the corresponding WASM file and Qt-JavaScript Api should be updated on the qmlonline/wasm source directory.

Running the web page locally

cd ../qmlonline/wasm
emrun  index.html

Notes on this

It is necessary to have installed Qt for WebAssembly.

Acknowledgments

  • The general programming idea was taken from QML Online.
  • The embeddable code editor in JavaScript is supported by Ace JavaScript sources.