QML Page Loading/Navigating Question
-
wrote on 31 Jan 2011, 15:36 last edited by
I see three potential options for navigating between QML pages in our application and I am wondering which would be the most performant. Also how would context be handled in each?
-
Use a Loader element that gets passed the source of the new qml page when a button is clicked: onClicked: pageModel.changePage("pages/gpsSystemPage.qml")
-
Have one qml page that treats every page like a component and transitions them into the viewport using states.
-
Use QDeclarativeEngine or QDeclarativeComponent to load each of the qml pages from the C++ portion of the application.
Any thoughts would be appreciated.
-
-
wrote on 31 Jan 2011, 15:53 last edited by
If you want to use animation among pages one qml page will be better.
-
wrote on 31 Jan 2011, 15:55 last edited by
If we were to assume no transitions, is that option the least memory intensive?
-
wrote on 1 Feb 2011, 03:02 last edited by
I don't know anything about how the qml engine works but I have to guess/believe that #3 is probably the least memory intensive. #2 should be the worst from a memory perspective. #1 is probably either like #3 (hopefully free all the memory used by the previous pages when they are out of scope) or like #2 (all the components are still in the scope).
-
wrote on 1 Feb 2011, 03:26 last edited by
Changing the source of a Loader will cause the previously loaded source to be freed, so (1) is better than (2) in terms of memory requirements.
Regards,
Michael -
wrote on 3 Feb 2011, 06:04 last edited by
hi kyleplattner.
hey i m using loader to navigate between pages..but can u tell me how to make transition while navigating....regards
imrrk
1/6