Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. scaling currentItem in PathView
Qt 6.12 LTS is out! See what's new in the release blog

scaling currentItem in PathView

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 262 Views
  • 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.
  • D Offline
    D Offline
    dsba
    wrote on last edited by
    #1

    I have a set of data coming from DataModel, I am displaying on PathView as I was required with closed path. I want the currentItem to be always at the center with increased size. Also spacing between each item should be equal.

    If PathAttribute is given:
    path: Path {
    startX: 0
    startY: root.height * 0.5

            PathLine {
                x: root.width * 0
                y: root.height * 0.5
            }
            PathAttribute { name: "itemscale"; value: 1.0 }
    
            PathLine {
                x: root.width * 0.25
                y: root.height * 0.5
            }
            PathAttribute { name: "itemscale"; value: 0.75 }
    
            PathLine {
                x: root.width * 0.5
                y: root.height * 0.5
            }
            PathAttribute { name: "itemscale"; value: 1.65 }
    
            PathLine {
                x: root.width * 0.75
                y: root.height * 0.5
            }
            PathAttribute { name: "itemscale"; value: 0.8 }
    
            PathLine {
                x: root.width
                y: root.height * 0.5
            }
            PathAttribute { name: "itemscale"; value: 1.0 }
    

    This code snippet gives currentItem at center but scaling is slightly present with previous and next item too. Also spacing between each item are not same.

    It would be a greater help if someone can explain where I am going wrong to achieve this.

    Thanks in advance

    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
    • Unsolved