qtdoc/examples/demos/windowembedding
Morten Sørvig 4c9f150c9b Add windowembedding wasm test case
This uses the "Cally" JS calendar component as the
native window, since the built in calendar input displays
the calendar as a popup and not on the input element
itself.

The native calendar element is created from JavaScript,
ownership is then passed to emscripten::val on the C++
side:

   element -> EM_VAL -> emscripten::val

Alternatively, the calendar could also have been created
from C++ using code like

   val calendar = val::global("document").call<val>("createElement", std::string("calendar-date"));
   calendar["innerHTML"] = std::string("<calendar-month></calendar-month>");

We create a copy of the calendar val on the heap in order
to be able to pass a pointer to fromWinId() which does not
become stale when the function returns.

Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: Ib68e82f01dc1c489b847b794aa09d6ccc9986157
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2025-03-26 14:59:04 +01:00
..
doc Add windowembedding wasm test case 2025-03-26 14:59:04 +01:00
CMakeLists.txt Add Embedded Windows example 2024-09-18 00:04:13 +02:00
Main.qml Add Embedded Windows example 2024-09-18 00:04:13 +02:00
main.cpp Add windowembedding wasm test case 2025-03-26 14:59:04 +01:00