In my mobile app, I want to load a 'default' page from my main.cpp:

Qt Code:
  1. X.engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
To copy to clipboard, switch view to plain text mode 

I use my main.qml as a 'container' for all the pages of my app. Right now, I have them all defined in main.qml:

Qt Code:
  1. Rectangle {
  2. id: winRect
  3. visible: true
  4. anchors.right: parent.right
  5. anchors.left: parent.left
  6. anchors.top: header.bottom
  7. anchors.bottom: footer.top
  8. color: "black"
  9.  
  10. MainWin {
  11. id: mainWin
  12. anchors.fill: parent
  13. visible: false;
  14. z: 0;
  15. }
  16.  
  17. InfoWin {
  18. id: infoWin
  19. anchors.fill: parent
  20. visible: false;
  21. z: 0;
  22. }
  23.  
  24. SettingsWin {
  25. id: settingsWin
  26. anchors.fill: parent
  27. visible: false;
  28. z: 0;
  29. }
  30.  
  31. FileInfoWin {
  32. id: fileInfoWin
  33. anchors.fill: parent
  34. visible: false;
  35. z: 0;
  36. }
  37.  
  38. BusyWin {
  39. id: busyWin
  40. anchors.fill: parent
  41. visible: false;
  42. z: 0;
  43. }
  44.  
  45. ErrorWin {
  46. id: errorWin
  47. anchors.fill: parent
  48. visible: false;
  49. z: 0;
  50. }
  51. }
To copy to clipboard, switch view to plain text mode 

Then, later, via JavaScript, I 'show' the desired page by setting all 'visible' to false, then to true on the correct page. This all works fine...but causes a really slow startup time on iOS. I believe it is due to ALL my sub-pages being loaded at boot-time.

My question is... How can I use a Loader to load each page on demand, but still be able to access the attributes of each page when it is not loaded? For instance, I have Speed and Heading that get updated on two different pages every second or so. If a page is not "loaded" by the Loader, how can I update it's attributes?

IF that is not possible, then how can I detect when a page has fully loaded? As I understand it, the OnCompleted signal does not necessarily fire AFTER a component has been fully loaded.

--Sam