Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Visibility of delegate in pathview in QML
Qt 6.12 LTS is out! See what's new in the release blog

Visibility of delegate in pathview in QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
@dheerendra@qmlandqtquick@pathviewdeleag
1 Posts 1 Posters 607 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.
  • N Offline
    N Offline
    Nahush Bharadwaj
    wrote on last edited by
    #1

    import QtQuick 2.12
    import QtQuick.Window 2.12
    Rectangle{
    anchors.fill: parent
    id: myView
    PathView {
    id:myList
    anchors.fill:parent
    anchors.verticalCenter: parent.verticalCenter
    property int widthAllList: (widthItemSelect+widthItemNotSelect
    (model-1))
    property int widthItemSelect: 350
    property int widthItemNotSelect: 350
    preferredHighlightBegin: 0.3
    preferredHighlightEnd: 0.3
    model: 10
    delegate: Rectangle{
    id:contentRect
    width: 300;
    height: parent.height-200
    color:"red"
    radius: 200
    }
    path: Path {
    id:myPath
    startX: (myView.width-myList.widthAllList)/2
    startY: myView.height/2
    PathLine { x: myPath.startX+myList.widthAllList; y:myView.height/2 }
    }
    }
    *

    *Hi All,

    When the first Index (center rectangle) of delegate is visible the half delegate i.e last index (left Side) which is displaying should not be visible where as when last index (center rectangle) delegate is displayed the displaying half delegate of first index (right side) should not be visible. When delegate is out of screen the object is destroyed!output image

    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