Reputation: 29
When I click the button "add", my QML interface is displayed. If I close this interface, it won't open again. I think my loader is executed only one time.
Loader {
id: idLoader
onLoaded: {
console.log("DIALOG LOADED")
}
}
My button:
Button {
id: add
text: "add"
width: 100
onClicked: {
idLoader.source = "qrc:/folder/MyInterface.qml
}
}
Upvotes: 0
Views: 384
Reputation: 24416
It doesn't open again because the source
doesn't change after the first time. If you want to show your interface a second time, set the visible
property of idLoader
to true
.
Upvotes: 1