Build applications for the Web | Qt Creator Documentation

- Qt Creator Documentation
- Build applications for the Web
- Qt Creator 15.0.0

How To

# Build applications for the Web

WebAssembly is a binary format that allows sand-boxed executable code in web pages. This format is nearly as fast as native machine code. It is supported by all major web browsers.

Use Qt for WebAssembly to build your applications in WebAssembly format and deploy and run them on the local web browser. Change the web browser in the project's run settings.

Note: Enable the WebAssembly plugin to use it.

To build applications for the web and run them in a web browser, install Qt for WebAssembly with Qt Online Installer. It automatically adds a build and run kit to Qt Creator.

## Set up WebAssembly development environment

To set up the development environment for WebAssembly:

1. Go to Preferences > Devices > WebAssembly.
2. In Emscripten SDK path, enter the root directory where you installed `emsdk`.
3. Qt Creator configures the Emscripten SDK environment for you if your Qt for WebAssembly version supports the `emsdk`.

4. Go to Preferences > Kits.

5. If Emscripten Compiler was not automatically set for both C++ and C, check that emscripten is set up correctly.

See also Run applications in a web browser.

How To