Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Page Loading/Navigating Question

QML Page Loading/Navigating Question

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 5 Posters 5.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kyleplattner
    wrote on last edited by
    #1

    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?

    1. 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")

    2. Have one qml page that treats every page like a component and transitions them into the viewport using states.

    3. Use QDeclarativeEngine or QDeclarativeComponent to load each of the qml pages from the C++ portion of the application.

    Any thoughts would be appreciated.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexander
      wrote on last edited by
      #2

      If you want to use animation among pages one qml page will be better.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kyleplattner
        wrote on last edited by
        #3

        If we were to assume no transitions, is that option the least memory intensive?

        1 Reply Last reply
        0
        • F Offline
          F Offline
          fcrochik
          wrote on last edited by
          #4

          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).

          Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mbrasser
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            • I Offline
              I Offline
              imrrk
              wrote on last edited by
              #6

              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 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved