Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Behaviour of BottomEdge and PageStack

    App Development
    4
    6
    322
    Loading More Posts
    • 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.
    • S
      sb last edited by

      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!

      CiberSheep I A S 4 Replies Last reply Reply Quote 1
      • CiberSheep
        CiberSheep @sb last edited by

        @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

        Another planet, another time, another universe!

        1 Reply Last reply Reply Quote 1
        • I
          irnbru @sb last edited by

          @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

          S 1 Reply Last reply Reply Quote 2
          • A
            Aloys @sb last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • S
              sb @irnbru last edited by

              @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!

              1 Reply Last reply Reply Quote 1
              • S
                sb @sb last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post