Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Horizontal list of items with animated scaling of center item

Horizontal list of items with animated scaling of center item

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 3 Posters 2.0k Views 2 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.
  • M Offline
    M Offline
    MajidKamali
    wrote on last edited by
    #1

    Hi.
    How can I create a horizontal list of a custom widget?
    I want to use this list in mobile, so I want to scroll it with touch event.
    Also I want that, the list, shows 3 Items at a time, and the center Item be bigger than the others. just exactly like hill climb racing game.
    https://play.google.com/store/apps/details?id=com.fingersoft.hillclimb&hl=en

    How can I achieve this? can I create animation for scaling center item size?
    Also, I want to use it in a QGraphicsView element.

    Thanks in advance.
    Excuse me for bad english :)

    p3c0P 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It would be easier to do with QML and Qt Quick both for animation and touch handing.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M MajidKamali

        Hi.
        How can I create a horizontal list of a custom widget?
        I want to use this list in mobile, so I want to scroll it with touch event.
        Also I want that, the list, shows 3 Items at a time, and the center Item be bigger than the others. just exactly like hill climb racing game.
        https://play.google.com/store/apps/details?id=com.fingersoft.hillclimb&hl=en

        How can I achieve this? can I create animation for scaling center item size?
        Also, I want to use it in a QGraphicsView element.

        Thanks in advance.
        Excuse me for bad english :)

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

        @MajidKamali As said by @SGaist with QML you can use ListView or PathView(for circular list)

        157

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MajidKamali
          wrote on last edited by MajidKamali
          #4

          Thanks guys.
          PathView documentation has a great Example
          http://doc.qt.io/qt-5/qml-qtquick-pathview.html

          BUT, can I create somthing similar with listview? because I want other Items to be outside of screen boundry

          p3c0P 1 Reply Last reply
          0
          • M MajidKamali

            Thanks guys.
            PathView documentation has a great Example
            http://doc.qt.io/qt-5/qml-qtquick-pathview.html

            BUT, can I create somthing similar with listview? because I want other Items to be outside of screen boundry

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

            @MajidKamali

            BUT, can I create somthing similar with listview? because I want other Items to be outside of screen boundry

            Yes but ListView doesn't have the exact same features as that of PathView.
            What do you mean by screen boundary ?

            157

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MajidKamali
              wrote on last edited by
              #6

              I tried PathView. setting some PathLine objects with x, outside the screen width can simulate a linear horizontal listview.
              but my problem is that, it cycles through items. when it reaches the last item, next item is the first one.
              I want that similar to listview, when it reaches the end item, user can not swipe to next Item, it stops there, and does not show first Item next to last one.

              p3c0P 1 Reply Last reply
              0
              • M MajidKamali

                I tried PathView. setting some PathLine objects with x, outside the screen width can simulate a linear horizontal listview.
                but my problem is that, it cycles through items. when it reaches the last item, next item is the first one.
                I want that similar to listview, when it reaches the end item, user can not swipe to next Item, it stops there, and does not show first Item next to last one.

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

                @MajidKamali

                I want that similar to listview, when it reaches the end item, user can not swipe to next Item, it stops there, and does not show first Item next to last one.

                ListView doesn't have that feature. You have to use PathView.

                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