I have main.qml
and dynamic.qml
files that i want to load dynamic.qml
on main.qml
using Loader {}
.
Content of dynamic.qml
file is dynamic and another program may change its content and overwrite it.
So i wrote some C++ code for detecting changes on file and fires Signal.
My problem is that I don't know how can i force Loader to reload file.
This is my current work:
MainController {
id: mainController
onInstallationHelpChanged: {
helpLoader.source = "";
helpLoader.source = "../dynamic.qml";
}
}
Loader {
id: helpLoader
anchors.fill: parent
anchors.margins: 60
source: "../dynamic.qml"
}
I think that QML Engine caches dynamic.qml
file. So whenever I want to reload Loader, it shows old content. Any suggestion?