I have a sheet declared in my QML file, which has the id "splashscreen"
When my app performs a computationally intensive task, I emit the working() signal.
I have this code attached to the main element of my QML file:
onCreationCompleted: {
_encryptedattachment.finished.connect(splashscreen.close);
_encryptedattachment.working.connect(splashscreen.open);
console.log("connected");
}
If I open the app through an invoke on a file which needs decrypting, the
_encryptedattachment.working.connect(splashscreen.open);
does not open the splashscreen, even though the event is being fired (I checked in the debugger that the code
emit working()
is executed.
EDIT:
I changed the onCreated code to this:
onCreationCompleted: {
splashscreen.open();
_encryptedattachment.working.connect(showSplash);
_encryptedattachment.finished.connect(hideSplash);
console.log("connected");
}
function showSplash() {
console.log("open splashscreen");
splashscreen.open();
}
function hideSplash() {
console.log("close splashscreen");
splashscreen.close();
}
and both those logs are appearing in the console.