[Interest] QML Loader unloading bug?

Nuno Santos nunosantos at imaginando.pt
Tue Feb 24 16:28:42 CET 2015


Hi,

Loader is supposed to unload the content when source is set to another url or to an empty string.

However, I’m not being able to have that behaviour. This is what I have.

When the variable value changes, the initial item is not removed, staying below the new one. 

I can’t get over this… 

Is this a bug? 

Loader {
    id: root
    clip: true
    source: ""
    states: [
        State {
            when: !controller.userManager.isLogged
            PropertyChanges { target: root; source: Qt.resolvedUrl("MenuProfileLogin.qml") }
        },
        State {
            when: controller.userManager.isLogged
            PropertyChanges { target: root; source: Qt.resolvedUrl("MenuProfileDetail.qml") }
        }
    ]
}

Regards,

Nuno Santos


More information about the Interest mailing list