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

3 pages circular ListView

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 776 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.
  • C Offline
    C Offline
    Cuke
    wrote on last edited by
    #1

    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
    0

    • Login

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