diff --git a/examples/background_loading/index.html b/examples/background_loading/index.html index 56ed25afcb30136e2367ba920d481379868fe578..c6cdd84e6ae99a4c4b8601f0b7c09a8de09ddc07 100644 --- a/examples/background_loading/index.html +++ b/examples/background_loading/index.html @@ -4,6 +4,7 @@ <meta charset="utf-8"> <title>Qt Background Loading</title> <script src="../testapp/testapp.js"></script> + <script src="../testapp/qtloader.js"></script> <script> window.addEventListener('load', async () => { @@ -14,8 +15,11 @@ // config object containing standard Emscripten configuration options. // In addtion, Qt app instances reads a couple of options like "qtContainerElements" // at startup. - let instance = await createQtAppInstance({ - "qtContainerElements": [container] + let instance = await qtLoad({ + qt: { + containerElements: [container], + entryFunction: testapp_entry + } }); // At this point the Qt instance has been created; update the diff --git a/examples/javascript_interop/index.html b/examples/javascript_interop/index.html index cad532cd62a586ec88ad0b21ca6bcf14066a196a..fa80cc0a0bcb60875acdb5ceda729db90c3f9b58 100644 --- a/examples/javascript_interop/index.html +++ b/examples/javascript_interop/index.html @@ -18,7 +18,11 @@ window.data = new Uint8Array([1, 2, 3 ,4]); window.addEventListener('load', async () => { - const instance = await qtLoad({qt:{}}); + const instance = await qtLoad({ + qt: { + entryFunction: testapp_entry + } + }); // enable the "Call C++" button which calls the function exported from jsinterop.cpp. const callCppButton = document.getElementById("callcpp"); diff --git a/examples/multiple_instances/index.html b/examples/multiple_instances/index.html index 02c3e33014c714b4c0c9747a864ff876753b07b3..7eef8ca76d738da102a098a591e4e6d1721c6264 100644 --- a/examples/multiple_instances/index.html +++ b/examples/multiple_instances/index.html @@ -23,8 +23,8 @@ const instance = await qtLoad({ qt: { containerElements: [container], - modulePromise: module, - module: module, // ### decide on which one + module: module, + entryFunction: testapp_entry } }); container.style.visibility = "visible"; @@ -47,7 +47,7 @@ <p>The application windows will appear below, when loaded.</p> <div id="appcontainer1" style="width:320px; height:200px; visibility:hidden"></div> - <p>Window below not showing? Upgrade to Qt >= 6.5.</p > + <br> <div id="appcontainer2" style="width:320px; height:200px; visibility:hidden"></div> </body> </html> \ No newline at end of file diff --git a/examples/multiple_windows/index.html b/examples/multiple_windows/index.html index f78f44240b99857ddc8f5ee17020656d7c2da02b..81d9b447121d2dbdc94dbec0626538c06366b681 100644 --- a/examples/multiple_windows/index.html +++ b/examples/multiple_windows/index.html @@ -18,7 +18,11 @@ { // Create test app instance via the default window.createQtAppInstance entry function // set by testapp.js - const instance = await qtLoad({}); + const instance = await qtLoad({ + qt: { + entryFunction: testapp_entry + } + }); // The Qt instance has been created; enable ui. let addWindow = document.getElementById("create-window-button"); diff --git a/examples/multiple_windows_simple/index.html b/examples/multiple_windows_simple/index.html index 7e31b3db251792f2c02c11ef7c49ba9cb4321a51..d8f28028aa2209294f13931a762828623dfd7d9a 100644 --- a/examples/multiple_windows_simple/index.html +++ b/examples/multiple_windows_simple/index.html @@ -13,6 +13,7 @@ const instance = await qtLoad({ qt: { containerElements: containers, + entryFunction: testapp_entry } }); }); diff --git a/examples/popup_window/index.html b/examples/popup_window/index.html index 9897ec43d188626d3029fbcf29484a81875799da..33283e534c54a717724d51f73478b0eb2a0d1aae 100644 --- a/examples/popup_window/index.html +++ b/examples/popup_window/index.html @@ -13,7 +13,11 @@ // Create Qt application instance. This instance exports openPopup and // closePopup, which we call below. See ../testapp/popup.cpp for the // implementation. - window.instance = await qtLoad({}); + window.instance = await qtLoad({ + qt: { + entryFunction: testapp_entry + } + }); let openPopup = document.getElementById("open-popup"); openPopup.disabled = false;