Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    3 pages circular ListView

    QML and Qt Quick
    1
    1
    634
    Loading More Posts
    • 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.
    • C
      Cuke last edited by

      I managed to create a 3 pages circular listview. However i came to this solution by a try/change/execute process. Is there someone that can help me understand the x,y coordinates of the PathLines?
      Given a width of 500px for each rectangle the three points of the path are: -250, 750, 1250.
      But in my opinion this doesn't make sense. I thought that the correct answer would be -250, 250, 750.

      @import QtQuick 2.0

      Item
      {
      id: root
      width: 500
      height: 500

      Path
      {
          id: path
          startX: -(width / 2); startY: root.height / 2
          PathLine { x: width + (width / 2); y: root.height / 2}
          PathLine { x: (2 * width) + (width / 2); y: root.height / 2}
      }
      
      Component
      {
          id: delegate
          Rectangle
          {
              width: root.width
              height: root.height
              color: model.color
          }
      }
      
      ListModel
      {
          id: model
          ListElement { color: "red" }
          ListElement { color: "green" }
          ListElement { color: "blue" }
      }
      
      PathView
      {
          anchors.fill: parent
          path: path
          clip: true
          delegate: delegate
          model: model
          snapMode: PathView.SnapOneItem
      }
      

      }

      @

      1 Reply Last reply Reply Quote 0
      • First post
        Last post