Sometimes Stack Pop is not working properly.
-
@sierdzio no there aren't any such property. can you suggest me something else in place of stack pop?
@trupti007 you should also check your depth property when you call pop, to check if you have actually more items on the stack than you expect.
-
Hm I thought old items are always visible only in SwipeView, but maybe they are so as well in StackView. Documentation does not seem to mention it.
Can you share some code of how you operate your Stack?
-
Hm I thought old items are always visible only in SwipeView, but maybe they are so as well in StackView. Documentation does not seem to mention it.
Can you share some code of how you operate your Stack?
@sierdzio
on my page page i have defined the stack view
StackView{
id: stackView
focus: true
anchors.fill: parent
clip: true
}
And this is how i have used stackView.pop(). On some pages it is working fine but some pages it is just not.
Keys.onBackPressed: {
stackView.pop();
} -
@sierdzio
on my page page i have defined the stack view
StackView{
id: stackView
focus: true
anchors.fill: parent
clip: true
}
And this is how i have used stackView.pop(). On some pages it is working fine but some pages it is just not.
Keys.onBackPressed: {
stackView.pop();
}@trupti007 said in Sometimes Stack Pop is not working properly.:
On some pages it is working fine but some pages it is just not
Then analyze the code differences between those pages. If it only fails for some cases, you are likely to find a bug in your code. Maybe an element has it's
visible
property forced totrue
somewhere? -
@trupti007 said in Sometimes Stack Pop is not working properly.:
On some pages it is working fine but some pages it is just not
Then analyze the code differences between those pages. If it only fails for some cases, you are likely to find a bug in your code. Maybe an element has it's
visible
property forced totrue
somewhere? -
@sierdzio no there aren't any such property. can you suggest me something else in place of stack pop?
@trupti007 you should also check your depth property when you call pop, to check if you have actually more items on the stack than you expect.
-
@trupti007 you should also check your depth property when you call pop, to check if you have actually more items on the stack than you expect.
-
StackView{ id: sView function popOne(){ console.log("stackdepth",sView.depth) sView.pop() } }
-
StackView{ id: sView function popOne(){ console.log("stackdepth",sView.depth) sView.pop() } }
-
StackView{ id: sView function popOne(){ console.log("stackdepth",sView.depth) sView.pop() } }