Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. New qtloader
Forum Updated to NodeBB v4.3 + New Features

New qtloader

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
3 Posts 3 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Modjo IT
    wrote on last edited by
    #1

    I moved to QT 6.9.1 from Qt6.5.3 and now I can't run anymore my application. I get the error "config.qt.entryFunction is not a function". I upgrade my html file to use qtLoad, but it seems that window.createQtAppInstance is not present in the js file created by emsdk. What I'm doing wrong? Who's setting "createQtAppInstance" inside my app?

    This is the piece of the html I'm using

                const instance = await qtLoad({
                    qt: {
                        onLoaded: () => showUi(screen),
                        onExit: exitData =>
                        {
                            status.innerHTML = 'Application exit';
                            status.innerHTML +=
                                exitData.code !== undefined ? ` with code ${exitData.code}` : '';
                            status.innerHTML +=
                                exitData.text !== undefined ? ` (${exitData.text})` : '';
                            showUi(spinner);
                        },
                        entryFunction: window.createQtAppInstance,
                        containerElements: [screen],
                        
                    }
                });
    
    1 Reply Last reply
    0
    • E Offline
      E Offline
      EduardoQtDev
      wrote on last edited by
      #2

      check https://forum.qt.io/post/775817

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Morten S
        wrote last edited by
        #3

        Hi, this might be covered by the linked to post, but to answer here as well:

        This was changed in 6.9, the entry/constructor function name is not hardcoded to "createQtAppInstance" any more but is now named after the application, with an "_entry" suffix.

        For example If you have myapp.js (and load that using e.g. a <script> tag) then you should find the constructor function at window.myapp_entry.

        This enables support for loading multiple wasm modules (with separate constructor functions) into a single web page, at the cost of having to name the entry function in the html code.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved