UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Change View?

    Scheduled Pinned Locked Moved App Development
    3 Posts 2 Posters 283 Views 2 Watching
    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.
      • 0 Offline
        007fred50
        last edited by

        Hello,

        How can i change view? new pages, QML

        i try to this here:

        Item {
               width: 200; height: 200
        
               Loader { id: pageLoader }
        
               Button{
                   id: btn1
                   text: "ChangeView Page2"
                   onClicked: pageLoader.source = "Page2.qml"
               }
        }
        

        But the View will overlap the MainView.
        I have 2 files.
        Main.qml and Page2.qml

        Thanks for your time 🙂

        1 Reply Last reply Reply Quote 0
        • CiberSheepC Offline
          CiberSheep
          last edited by

          Maybe you could use a PageStack:
          https://api-docs.ubports.com/sdk/apps/qml/Ubuntu.Components/PageStack.html

          You can pile pages or clear it and push a single page (not recomended)

          Another planet, another time, another universe!

          0 1 Reply Last reply Reply Quote 0
          • 0 Offline
            007fred50 @CiberSheep
            last edited by

            @CiberSheep Thanks, PageStack works fine 🙂

            1 Reply Last reply Reply Quote 0
            • First post
              Last post