×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    80

    Passing parameter from one page to another

    Hi Expert,

    I got a problem like this, I have a QML page A from where I load page B by using the following.
    pageStack.push(Qt.resolvedUrl("B.qml"))
    In page B I want to edit the passed item and would like to comeback to page A by pressing back button.

    How I achieve this? Problem here I see that when I have property of page A then page B does not exist. There is some discussion in this page
    http://doc.qt.nokia.com/qt-component...pagestack.html (Passing Parameters to Pages)
    The code below gives an example of pushing a page to the page stack and setting a property for that page.

    pageStack.push( componentPage, {message: pageStack.depth+1});

    This looks might solved my problem, but does it mean we are passing message to page B in my case?

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Passing parameter from one page to another

    Sorry your question is not so clear to be , but if you are asking to which page the parameters are getting delivered than ofcourse its B as thats the calling Page.

    Let us know if you need anything more specific.

  3. #3
    Registered User
    Join Date
    Aug 2011
    Posts
    32

    Re: Passing parameter from one page to another

    Code:
    pageStack.push(Qt.resolvedUrl("B.qml"))
    In this way Page B gets created when called the first time, but you need it already created, so create it statically in main.qml and call it directly (assign an id to it and use pageStack.push(pageBid) )

    Is better to create it in the main.qml so you have visibility (and so access) to it from every qml file.

  4. #4
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    80

    Re: Passing parameter from one page to another

    Quote Originally Posted by gaba88 View Post
    Sorry your question is not so clear to be , but if you are asking to which page the parameters are getting delivered than ofcourse its B as thats the calling Page.

    Let us know if you need anything more specific.

    Hi,
    Sorry, my msg was not clear.
    How this message is passed to the pushed page? How do I receive the message in the target page and if I want to come back to the previous page (the message I sent I want to get back with update when the page is popped)
    pageStack.push( componentPage, {message: pageStack.depth+1});

Similar Threads

  1. Parameter Passing-String.
    By ovvenkatesan in forum Symbian
    Replies: 4
    Last Post: 2007-10-11, 10:50
  2. Passing & returning parameter to/from function
    By jarruots in forum Symbian
    Replies: 3
    Last Post: 2006-11-21, 12:17
  3. Passing parameter to Application
    By jigneshshah in forum Symbian
    Replies: 1
    Last Post: 2005-08-31, 03:32
  4. parameter passing through url
    By kevin1964 in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2004-04-07, 16:21
  5. Parameter passing
    By Nokia_Archive in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2002-05-15, 02:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •