Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Help with onPushed()/onPopped()

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17964

    Lorne

    I’m having some trouble using onPushed() and onPopped() in a NavigationStack.  Here’s a sample of the code:

          NavigationStack {
            JobsPage { }
    
            onPushed: {
              console.log("push " + item);
              console.log("push.id " + item.id);
              console.log("push.name " + item.objectName);
            }
    
            onPopped: {
              console.log("pop " + item);
              console.log("pop.id " + item.id);
              console.log("pop.name " + item.objectName);
            }
          }

    The output looks like the following:

     

    qml: push NavigationStack_QMLTYPE_62(0x60f0000b74c0, “_NavigationStack”)

    qml: push.id undefined

    qml: push.name _NavigationStack

    qml: pop NavigationStack_QMLTYPE_62(0x60f0000b74c0, “_NavigationStack”)

    qml: pop.id undefined

    qml: pop.name _NavigationStack

     

    How exactly am I suppose to recognize which page is pushed and popped?  I can’t seem to identify the pages by id or objectName.

     

    #17965

    Günther
    Felgo Team

    Hi Lorne,

    The NavigationStack::popped and pushed signals pass a page parameter, which holds the Page item that is popped or pushed to the stack.

    Best,
    Günther

    #17967

    Lorne

    Yes I see the error now.  I was trying to access the variable name as item, instead of page.  It’s working now, thank you.

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded