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. webassembly XmlListModel not working
Forum Updated to NodeBB v4.3 + New Features

webassembly XmlListModel not working

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
1 Posts 1 Posters 338 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.
  • P Offline
    P Offline
    poucz
    wrote on last edited by
    #1

    Hello,
    I have test program, I work fine in normal desktop.
    When I complile it with webassembly, XmlListModel not load data.
    In console I see :
    qml: XML Status change 2 error:

    So XmlListModel not go to state 1 (Ready state), I dont know why.
    In web browser I see query "http://127.0.0.1/text.xml" and good response (xml).

    What is wrong?
    Thank you

    Rectangle{
        XmlListModel {
            id: xmlModel
           source: "http://127.0.0.1/text.xml"
            query: "/cross/cros"
            XmlRole { name: "time";        query: "@time/string()" }
            onStatusChanged: {
                console.log("XML Status change "+status+" error:"+errorString())
            }
        }
    
    
        ListView {
            id:view
            anchors.fill: parent
            model: xmlModel
            delegate: Text {
                text: time
            }
        }
    }
    
    
    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