title: QML : Navigation between qml pages from design perception
body: <p>We need to develop a QtQuick project, where we have about 100 screens. </p>
  
  <p>I had tried to make a demo project for the navigation which has three screens on button click. I had used the concepts of 'States' in the navigation between the pages. Initially I tried the same using 'Loader' but loader was not able to retain the previous state of page, it was re-loading the entire page during the navigation.</p>
  
  <p>Below is the code snippet of main.qml</p>
  
  <pre><code>// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
  import QtQuick 1.1
  
  Rectangle {
      id:main_rectangle
      width: 360
      height: 640
  
      Page1{
          id:page1
      }
  
      Page2{
          id:page2
      }
  
      Page3{
          id:page3
      }
  
      states: [
          State {
  
              name: "page2"
  
              PropertyChanges { target: page3; visible:false; }
              PropertyChanges { target: page1; visible:false; }
              PropertyChanges { target: page2; visible:true; }
          },
          State {
              name: "page1"
              PropertyChanges { target: page3; visible:false; }
              PropertyChanges { target: page2; visible:false; }
              PropertyChanges { target: page1; visible:true; }
          },
  
          State {
              name: "page3"
              PropertyChanges { target: page1; visible:false; }
              PropertyChanges { target: page2; visible:false; }
              PropertyChanges { target: page3; visible:true; }
          }
  
      ]
  
  }
  </code></pre>
  
  <p>This runs well with the small POC with three screens, but its not feasible to define states for 100 screens.</p>
  
  <p>From designing aspect we concluded to make a C++ controller we controls the states, visibility of various pages.</p>
  
  <p>Need suggestions how to implement the 'State' logic in C++. </p>