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. What Stackview.get() function returns? How to push again the returned Item in stack?
Forum Updated to NodeBB v4.3 + New Features

What Stackview.get() function returns? How to push again the returned Item in stack?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 231 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.
  • A Offline
    A Offline
    AICT_Radhika
    wrote on last edited by
    #1

    1.Select_Wash_Cycle.qml:

    I am trying to get the details of the current item/qml (Select_Wash_Cycle.qml) in stack before pushing another qml in stack as,

    previous_item = stack_view.get(1,false)
    console.log(previous_item )

    it gives me output as,
    Select_Wash_Cycle_QMLTYPE_27(0x2104d8c3a70)
    Now, I push another qml (Menu.qml) in stack.

    1. Menu.qml
      In Menu.qml I have close button, after clicking on that I want to push the previous_item which I get from First qml (in this case Select_Wash_Cycle.qml)
      the First qml may vary as per application flow. but after clicking the close button I need to go back to previous qml from which Menu.qml is pushed in stack.

    So, what is the correct syntax to push Select_Wash_Cycle_QMLTYPE_27(0x2104d8c3a70) in stack?

    GrecKoG 1 Reply Last reply
    0
    • A AICT_Radhika

      1.Select_Wash_Cycle.qml:

      I am trying to get the details of the current item/qml (Select_Wash_Cycle.qml) in stack before pushing another qml in stack as,

      previous_item = stack_view.get(1,false)
      console.log(previous_item )

      it gives me output as,
      Select_Wash_Cycle_QMLTYPE_27(0x2104d8c3a70)
      Now, I push another qml (Menu.qml) in stack.

      1. Menu.qml
        In Menu.qml I have close button, after clicking on that I want to push the previous_item which I get from First qml (in this case Select_Wash_Cycle.qml)
        the First qml may vary as per application flow. but after clicking the close button I need to go back to previous qml from which Menu.qml is pushed in stack.

      So, what is the correct syntax to push Select_Wash_Cycle_QMLTYPE_27(0x2104d8c3a70) in stack?

      GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote on last edited by
      #2

      To summarize, what you have on your stack is

      Select Wash Cycle -> Menu

      And you want to close Menu and go back to Select Wash Cycle.
      To do that you don't need to push, you just need to pop the top item in the Stack, Menu.
      Simply call yourStackView.pop().

      A 1 Reply Last reply
      0
      • GrecKoG GrecKo

        To summarize, what you have on your stack is

        Select Wash Cycle -> Menu

        And you want to close Menu and go back to Select Wash Cycle.
        To do that you don't need to push, you just need to pop the top item in the Stack, Menu.
        Simply call yourStackView.pop().

        A Offline
        A Offline
        AICT_Radhika
        wrote on last edited by
        #3

        @GrecKo Thanks for the reply.
        But I push some more sub menu qmls in stack and to exit from main menu I need to remember the Base page from which I entered in Menu

        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