What Stackview.get() function returns? How to push again the returned Item in stack?
-
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.- 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?
- Menu.qml
-
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.- 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?
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 callyourStackView.pop()
. - Menu.qml
-
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 callyourStackView.pop()
.@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