Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How doing page navigation in QT Quick
Forum Updated to NodeBB v4.3 + New Features

How doing page navigation in QT Quick

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 2 Posters 1.5k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    baer999
    wrote on last edited by
    #1

    I want to write an app for my Raspberry Pi 2,8 " TFT TouchScreen Panel.

    I designed two qml files (both as type Rectangle).

    Now I don't know how to change from screen1 to scree2 - with a Transition would be very nice...

    Can anybody help me with this problem?

    thx!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dasRicardo
      wrote on last edited by
      #2

      Hello,

      i think aou should have a look at "this...":http://qt-project.org/doc/qt-5/qml-qtquick-controls-stackview.html

      **Sorry for my english :)

      PLEASE ADD [SOLVED] TO YOUR THREAD TITLE IF IT'S SOLVED.**

      1 Reply Last reply
      0
      • B Offline
        B Offline
        baer999
        wrote on last edited by
        #3

        Is there some sample code available of how to use this?

        My problem is I have three QML files, in which should I insert the StackView and how exactly?

        thx !

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dasRicardo
          wrote on last edited by
          #4

          Normally you have a main file, your app window who you can add the stack item and now you can add other components/files as a page to the stack item with pop and push. Everything is explained in the documentation! Here a very simple and maybe not fully working example, i'm not at home so no guaranty.
          @
          Rectangle {
          Button {
          onClick: {
          stack.push(
          {
          item: Qt.resolvedUrl("MySecondItem.qml"),
          immediate: true,
          replace: true
          }
          );
          }
          }
          StackView
          {
          id: stack
          initialItem: Qt.resolvedUrl("MyFirstItem.qml")
          }
          }
          @

          **Sorry for my english :)

          PLEASE ADD [SOLVED] TO YOUR THREAD TITLE IF IT'S SOLVED.**

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dasRicardo
            wrote on last edited by
            #5

            Please mark threads as solved if it's done thx

            **Sorry for my english :)

            PLEASE ADD [SOLVED] TO YOUR THREAD TITLE IF IT'S SOLVED.**

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved