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 can i make a ListView continues to flick?

How can i make a ListView continues to flick?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 2 Posters 809 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.
  • CKurduC Offline
    CKurduC Offline
    CKurdu
    wrote on last edited by
    #1

    Hi everybody,
    When a listview at the boundary, I want it to continue to flick as appending itself at the end.
    Is it possible? I need two of them as horizontal and vertical orientation.

    You reap what you sow it

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      This is how ListView works. May be not understood question correctly ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      CKurduC 1 Reply Last reply
      0
      • dheerendraD dheerendra

        This is how ListView works. May be not understood question correctly ?

        CKurduC Offline
        CKurduC Offline
        CKurdu
        wrote on last edited by CKurdu
        #3

        @dheerendra
        Let me clarify the question with below example.

        import QtQuick 2.5
        
        Rectangle {
            anchors.fill: parent
            color:"black"
            Rectangle{
                width:parent.width/2
                height:parent.height/2
                anchors.centerIn: parent
        
            gradient: Gradient {
                GradientStop { position: 0.0; color: "#f6f6f6" }
                GradientStop { position: 1.0; color: "#d7d7d7" }
            }
        
            ListView {
                anchors.fill: parent
                anchors.margins: 20
                orientation: Qt.Horizontal
                layoutDirection: Qt.RightToLeft
                snapMode: ListView.SnapOneItem
                boundsBehavior:Flickable.DragAndOvershootBounds
        
                clip: true
        
                model: 5
        
                delegate: numberDelegate
                spacing: 5
        
                focus: true
            }
            }
        
            Component {
                id: numberDelegate
        
                Rectangle {
                    width: ListView.view.width
                    height: ListView.view.height
        
                    color: ListView.isCurrentItem?"#157efb":"#53d769"
                    border.color: Qt.lighter(color, 1.1)
        
                    Text {
                        id:tt
                        anchors.centerIn: parent
        
                        font.pixelSize: parent.height - parent.height/5
        
                        text: index
                    }
                }
            }
        }
        

        When the "0" item is visible, I want it to continue with "4" item on left to right flick.
        When the "4" item is visible, I want it to continue with "0" item on right to left flick.

        I have just found "pathview " can make it possible this scenario.

        Is this possible also for ListView?

        You reap what you sow it

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          PathView is an answer.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          CKurduC 1 Reply Last reply
          0
          • dheerendraD dheerendra

            PathView is an answer.

            CKurduC Offline
            CKurduC Offline
            CKurdu
            wrote on last edited by CKurdu
            #5

            @dheerendra
            So there is no solution for ListView. I don't find any property in the documentation for the matter.

            thanks dheerendra

            You reap what you sow it

            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