Results 1 to 1 of 1

Thread: Pushing a page to StackView from already pushed page

  1. #1
    Join Date
    Aug 2017
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Android

    Default Pushing a page to StackView from already pushed page

    I'm trying to display a page after clicking a button in qt quick, simple enough right?

    The main.qml is essentially just

    ApplicationWindow {
    StackView {
    id: stackView
    anchors.fill: parent

    initialItem: Pane {
    id: pane
    x: 0
    y: 0
    Mainpane {
    anchors.right: parent.right
    anchors.rightMargin: 0
    anchors.left: parent.left
    anchors.leftMargin: 0
    }
    }
    }

    Where MainPane is just a button that pushes the page StackedPage.qml to the stack.

    My question is, how do I push another page, say it's called SubPage.qml to the stack from StackedPage.qml?

    Do I need to create another stack in StackedPage.qml or can I push it to the main stack from main.qml?

    EDIT:
    So I found out that my stackView from my main page is carried through each page, so to transition between pages, I just need to pop and push.
    Last edited by aseylys; 25th August 2017 at 14:26.

Similar Threads

  1. Replies: 0
    Last Post: 28th June 2017, 00:24
  2. StackView get index or views page
    By KeineAhnung in forum Newbie
    Replies: 2
    Last Post: 18th November 2014, 23:03
  3. Load a simple Page after the Main Page.
    By mrhevor in forum Qt Quick
    Replies: 1
    Last Post: 27th September 2011, 11:32
  4. How can I support page up/page down on QTextEdit
    By wesley in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2010, 20:18
  5. QTabWidget remove a page at the page's request
    By thomaspu in forum Qt Programming
    Replies: 2
    Last Post: 29th December 2007, 21:45

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.