Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt for WebAssembly
Qt 6.11 is out! See what's new in the release blog

Qt for WebAssembly

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 753 Views 1 Watching
  • 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
    Mike Tolkachev
    wrote on last edited by
    #1

    I'm currently trying to make "photo album" app just for Qml WebAssembly testing.
    And i have some issue with Image.

    I have found this known issues:
    Network access: The web sandbox limits network access to a subset of what is available for native apps.
    QNetworkAccessManager http requests to the web page origin server, or to a server which supports CORS.

    Simple main.qml

    import QtQuick 2.12
    import QtQuick.Window 2.12
    
    Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    
        Image {
          id: liveImageItem
          height: parent.height
          width: parent.width
    
          source: "http://mydomain.com/img.jpg"
        }
    }
    

    I downloaded wasm binary and other files to mydomain.com
    Well, i opening mydomain, see Qt logo, downloading/compiling and white screen.
    What's wrong?

    raven-worxR 1 Reply Last reply
    0
    • M Mike Tolkachev

      I'm currently trying to make "photo album" app just for Qml WebAssembly testing.
      And i have some issue with Image.

      I have found this known issues:
      Network access: The web sandbox limits network access to a subset of what is available for native apps.
      QNetworkAccessManager http requests to the web page origin server, or to a server which supports CORS.

      Simple main.qml

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Image {
            id: liveImageItem
            height: parent.height
            width: parent.width
      
            source: "http://mydomain.com/img.jpg"
          }
      }
      

      I downloaded wasm binary and other files to mydomain.com
      Well, i opening mydomain, see Qt logo, downloading/compiling and white screen.
      What's wrong?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Mike-Tolkachev
      any hints in the browser's console?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      M 1 Reply Last reply
      0
      • raven-worxR raven-worx

        @Mike-Tolkachev
        any hints in the browser's console?

        M Offline
        M Offline
        Mike Tolkachev
        wrote on last edited by
        #3

        @raven-worx
        Oh, sorry, yes.
        Firefox showing it sometimes:
        Error: WebGL warning: texSubImage2D: Texture has not been initialized prior to a partial upload, forcing the browser to clear it. This may be slow. qtloader.js line 409 > eval:1:259963
        Error: WebGL warning: texSubImage2D: This operation requires zeroing texture data.

        1 Reply Last reply
        0

        • Login

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