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
Forum Updated to NodeBB v4.3 + New Features

StackView, "pop" a page by swiping

Scheduled Pinned Locked Moved QML and Qt Quick
stackview
6 Posts 2 Posters 2.9k Views 3 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.
  • L Offline
    L Offline
    luca
    wrote on 12 Jul 2015, 13:58 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

    P 1 Reply Last reply 13 Jul 2015, 03:51
    0
    • L luca
      12 Jul 2015, 13:58

      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

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 13 Jul 2015, 03:51 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 13 Jul 2015, 06:55
      0
      • P p3c0
        13 Jul 2015, 03:51

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

        L Offline
        L Offline
        luca
        wrote on 13 Jul 2015, 06:55 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.

        P 1 Reply Last reply 13 Jul 2015, 08:03
        0
        • L luca
          13 Jul 2015, 06:55

          @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.

          P Offline
          P Offline
          p3c0
          Moderators
          wrote on 13 Jul 2015, 08:03 last edited by
          #4

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

          157

          L 1 Reply Last reply 13 Jul 2015, 08:08
          0
          • P p3c0
            13 Jul 2015, 08:03

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

            L Offline
            L Offline
            luca
            wrote on 13 Jul 2015, 08:08 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.

            P 1 Reply Last reply 13 Jul 2015, 08:13
            0
            • L luca
              13 Jul 2015, 08:08

              @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.

              P Offline
              P Offline
              p3c0
              Moderators
              wrote on 13 Jul 2015, 08:13 last edited by
              #6

              @luca You can create your own effect using Transitions.

              157

              1 Reply Last reply
              0

              6/6

              13 Jul 2015, 08:13

              • Login

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