Behaviour of BottomEdge and PageStack
-
Hi guys,
I'm working on my first Ubuntu Touch app but sadly I've been stuck for several days. What I want to achieve is a BottomEdge component that contains a PageStack so that I can push 2 different pages that ask the user for some input. When I push the first Page onto the PageStack, the page's height is reset to 0 after (!) the page's component.onCompleted() method is executed and I can't figure out what's wrong. A more detailed explanation with code snippets is already on StackOverflow:
https://stackoverflow.com/questions/69292221/behaviour-of-pagestack-bottomedge-ubuntu-components
Maybe someone of you who's familiar with these components can help me out. I read all the relevant documentation but I can't figure out what's wrong.
If this is the wrong place to ask this kind of question, please let me know so I can close or delete it.Thanks for reading!
-
@sb I'm not sure the BottomEdge can cope with a PageStack. I think it was designed to hold an element or a Page.
You may look here: https://api-docs.ubports.com/sdk/apps/qml/Ubuntu.Components/BottomEdge.html#page-as-content
-
@sb I'm just starting with QML too so don't take anything i say as a good idea! but in the documentation it seems contentComponents width and height should be set to the parent Page width and height NOT BottomEdge.
I was still getting the same problems after changing this so I tried setting the contentComponent to a Rectangle and nesting the PageStack inside. After this, myStackPage.height no longer resets to 0.
Hope this might help
-
@sb I agree with @CiberSheep , I would not define a PageStack inside BottomEdge content, but only in a main view.
Probably you do not need at all pageStack because BottomEdge allow you to display a content that you should be able to set with an url (see ContentUrl in the API doc).This is just an idea, I never use myself BottomEdge.
-
@irnbru Hi, sorry for replying late. I tried what you suggested and it actually works as I want it to! Thats awesome! Thank you very much for taking some time to help!
-
This post is deleted!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login