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. StackView, "pop" a page by swiping

StackView, "pop" a page by swiping

Scheduled Pinned Locked Moved QML and Qt Quick
stackview
6 Posts 2 Posters 2.9k 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.
  • L Offline
    L Offline
    luca
    wrote on last edited by
    #1

    Hi all,
    I'm developing a QML UI mobile application using a StackView.
    I add a page with "push" command and I go "back" with "pop" command.

    At the moment I go back in the StackView using a Button:

    onClicked: {
    stack.pop();
    }

    Now I'd like to obtain the same result by swiping on the touch screen.
    If you know Sailfish OS it's what Silica UI do when you go to setting and than go back with a swipe.
    A workaround should be to use a ListView instead of the StackView.

    Is it possible with StackView?

    Thanks

    Luca

    p3c0P 1 Reply Last reply
    0
    • L luca

      Hi all,
      I'm developing a QML UI mobile application using a StackView.
      I add a page with "push" command and I go "back" with "pop" command.

      At the moment I go back in the StackView using a Button:

      onClicked: {
      stack.pop();
      }

      Now I'd like to obtain the same result by swiping on the touch screen.
      If you know Sailfish OS it's what Silica UI do when you go to setting and than go back with a swipe.
      A workaround should be to use a ListView instead of the StackView.

      Is it possible with StackView?

      Thanks

      Luca

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @luca Well IMO you will need to add your own implemntation of swipe using MouseArea.

      157

      L 1 Reply Last reply
      0
      • p3c0P p3c0

        @luca Well IMO you will need to add your own implemntation of swipe using MouseArea.

        L Offline
        L Offline
        luca
        wrote on last edited by
        #3

        @p3c0 Thanks for answer.
        That way I can manage the "pop" of StackView but I think the graphic effect isn't the same, I can't "move the screen back" as in a a ListView, I suppose.

        p3c0P 1 Reply Last reply
        0
        • L luca

          @p3c0 Thanks for answer.
          That way I can manage the "pop" of StackView but I think the graphic effect isn't the same, I can't "move the screen back" as in a a ListView, I suppose.

          p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          @luca If I understood you correctly then,
          Swipe left -> push
          Swipe right -> pop

          157

          L 1 Reply Last reply
          0
          • p3c0P p3c0

            @luca If I understood you correctly then,
            Swipe left -> push
            Swipe right -> pop

            L Offline
            L Offline
            luca
            wrote on last edited by
            #5

            @p3c0 No need to push because I push a new item in my stack by clicking something on the page.
            But I 'd like to have a "pop" by swiping to go to previous item in the stack. The problem is that the graphic effect should be as in a "carousel" list view when going back.

            p3c0P 1 Reply Last reply
            0
            • L luca

              @p3c0 No need to push because I push a new item in my stack by clicking something on the page.
              But I 'd like to have a "pop" by swiping to go to previous item in the stack. The problem is that the graphic effect should be as in a "carousel" list view when going back.

              p3c0P Offline
              p3c0P Offline
              p3c0
              Moderators
              wrote on last edited by
              #6

              @luca You can create your own effect using Transitions.

              157

              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