Question

Hi i have the doubt for the following scenario.

Home Screen -> Second screen (Push )
Second Sreen -> Home Screen (Pop)
Second screen-> Thrid screen (push)
Works correctly.

Now I need to
Third Screen -> Home Screen

home.qml

import bb.cascades 1.0
NavigationPane {
  page {
    Container {
      layout: StackLayout {
      }
      Button {
        text:"Go to Second screen"
      }
    }
  }
}

second.qml

import bb.cascades 1.0
page {
  Container {
    layout: StackLayout {
    }
    Button {
      text:"Go to Third screen"
    }
  }
}

third.qml

import bb.cascades 1.0
page {
  Container {
    layout: StackLayout {
    }
    Button {
      text:"Return to Home screen"
    }
  }
}
Was it helpful?

Solution

I found the solution.

navigationPane.navigateTo(rootPage);

rootPage - It is id of page in Home.qml

import bb.cascades 1.0
NavigationPane {
  page {
    id:rootPage;
    Container {
      layout: StackLayout {
      }
      Button {
        id:btnSecondScreen;
        text:"Go to Second screen"
      }
    }
  }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top