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. Page Navigation
QtWS25 Last Chance

Page Navigation

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 4 Posters 1.6k Views
  • 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.
  • M Offline
    M Offline
    Marek
    wrote on last edited by
    #1

    Hi

    In my app I have only a few main pages.
    I implemented SwipeView and it's OK, but I can't swipe directly from page 1 to 3, it goes through page 2.
    So, I have switched to StackView, but then when I'm switching through the pages I need to check whether page I want to show is already in stack, if so unwind to this page, if not push page to stack. I ended up with having one page in the stack and calling replace each time I want to show some page.
    I mean what for is this stack if I can't setCurrentIndex ;) I'm just switching from QWidgets to QML so maybe I'm getting something wrong?

    Best Regards
    Marek

    E 1 Reply Last reply
    0
    • M Marek

      Hi

      In my app I have only a few main pages.
      I implemented SwipeView and it's OK, but I can't swipe directly from page 1 to 3, it goes through page 2.
      So, I have switched to StackView, but then when I'm switching through the pages I need to check whether page I want to show is already in stack, if so unwind to this page, if not push page to stack. I ended up with having one page in the stack and calling replace each time I want to show some page.
      I mean what for is this stack if I can't setCurrentIndex ;) I'm just switching from QWidgets to QML so maybe I'm getting something wrong?

      Best Regards
      Marek

      E Offline
      E Offline
      Eeli K
      wrote on last edited by
      #2

      @Marek StackLayout lets you set the current index. StackView is good for a real stack with pop/push operations if you need them, StackLayout is a simple way to show one item at a time out of several.

      M 1 Reply Last reply
      0
      • E Eeli K

        @Marek StackLayout lets you set the current index. StackView is good for a real stack with pop/push operations if you need them, StackLayout is a simple way to show one item at a time out of several.

        M Offline
        M Offline
        Marek
        wrote on last edited by
        #3

        @Eeli-K Thanks, it is some solution, although it does not have transitions. Someone has done github example with StackLayout and transitions but... still probably StackView is a way to go.
        Thanks anyway ;)
        Marek

        ekkescornerE 1 Reply Last reply
        0
        • M Marek

          @Eeli-K Thanks, it is some solution, although it does not have transitions. Someone has done github example with StackLayout and transitions but... still probably StackView is a way to go.
          Thanks anyway ;)
          Marek

          ekkescornerE Offline
          ekkescornerE Offline
          ekkescorner
          Qt Champions 2016
          wrote on last edited by
          #4

          @Marek go to Google Play or Apple APP Store, search for 'Ekkehard Gentz' and you'll find some apps (per ex Qt World Summit 2016 or my brandnew BT LE example).
          These Apps all use StackViews:
          one StackView at root used by the Drawer, where for each Item in Drawer the Item get's replaced by a Page oder another StackView.
          Then you can navigate thru the Stack (pushing Pages on top, pop Page or go back to another one
          Apps are Open Source at GitHUb

          Also there are examples by me explaining all of this:
          StackView: https://appbus.wordpress.com/2016/05/27/stacked-pages-app/
          Drawer: https://appbus.wordpress.com/2016/06/20/drawer-navigation-app/

          have fun

          ekke ... Qt Champion 2016 | 2024 ... mobile business apps
          5.15 --> 6.8 https://t1p.de/ekkeChecklist
          QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

          F 1 Reply Last reply
          2
          • ekkescornerE ekkescorner

            @Marek go to Google Play or Apple APP Store, search for 'Ekkehard Gentz' and you'll find some apps (per ex Qt World Summit 2016 or my brandnew BT LE example).
            These Apps all use StackViews:
            one StackView at root used by the Drawer, where for each Item in Drawer the Item get's replaced by a Page oder another StackView.
            Then you can navigate thru the Stack (pushing Pages on top, pop Page or go back to another one
            Apps are Open Source at GitHUb

            Also there are examples by me explaining all of this:
            StackView: https://appbus.wordpress.com/2016/05/27/stacked-pages-app/
            Drawer: https://appbus.wordpress.com/2016/06/20/drawer-navigation-app/

            have fun

            F Offline
            F Offline
            FrankiPL
            wrote on last edited by
            #5

            @ekkescorner Thank you. Nice archive Qt for x-platform mobile development

            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