[Development] Qt for WebAssembly

Morten Sørvig Morten.Sorvig at qt.io
Mon Mar 12 12:29:08 CET 2018



> On 9 Mar 2018, at 19:09, Tim Murison <tim.murison at gmail.com> wrote:
> I'd also like to echo and hopefully amplify what Jason H said about
> qmlweb. IMO, this is the solution that Qt should be embracing and
> integrating upstream. qmlweb aims to do what Qt has always done, make
> cross-platform development easy, efficient and indistinguishable from
> native development.


I think qmlweb and Qt for wasm are fundamentally different enough
(reimplementing Qt Quick vs recompiling it for a new platform) that they
are not mutually exclusive. We could accept either or both upstream,

It could be interesting to make them API-compatible so that users can
move between them with minimal effort. For example by providing a “QtQuick.QMLEngine()”
Javascript API that can be used interchangeably with “QmlWeb.QMLEngine()”.

  var div = document.getElementById('embed');
  var engine = new QmlWeb.QMLEngine(div);
  engine.loadFile('qml/main.qml');
  engine.start();

Morten


More information about the Development mailing list