Qt World Summit: Register Today!

How to ativate/deactivate XmlListModel via JavaScript

  • Hi,
    I need to deactivate my XmlListModel after start and activate it after my button click.
    How can I do it?

    I tried to set source after my button click but XmlListModel.status returns 2 so it seems like I can not change source via JavaScript.

  • Hi,

    It should be okay to change source via JavaScript -- can you post a code snippet demonstrating the issue?


  • Hi,
    I am sorry for a late reply.

    xml.source = "adress";
    console.log(xml.source); //correct
    x = 0;
    while (xml.progress != 1) {
    console.log (xml.progress + "\n" + xml.status + "\n" + "---------------------------"); //the progress is always 0 and the status is 2
    if (x > 25) {

    There are not any XmlRole keys in XmlListModel.

Log in to reply