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. Customization PathView
Forum Update on Monday, May 27th 2025

Customization PathView

Scheduled Pinned Locked Moved QML and Qt Quick
qt5qmlpathviewpatharcmodel
2 Posts 2 Posters 1.2k 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.
  • T Offline
    T Offline
    Trikrista
    wrote on 4 May 2015, 21:03 last edited by Trikrista 5 Apr 2015, 22:38
    #1

    I have the code:

        PathView {
            id: view
            preferredHighlightBegin: 1
            preferredHighlightEnd: 1
            pathItemCount: Math.floor(Math.PI * activeTask.width * 340/(2 * 180 * 120))
            highlightRangeMode: PathView.ApplyRange//PathView.StrictlyEnforceRange
    
            anchors.fill: parent
            model: aTask.underTask
            delegate: delegateTask
    
            property int dragIndex: -1
    
            path: Path {
                startX: (activeTask.width / 2 - 35) * Math.cos(200 * Math.PI/180) + activeTask.width / 2
                startY: (activeTask.width / 2 - 35) * Math.sin(200 * Math.PI/180) + activeTask.width / 2
    
                PathArc {
                    x: (activeTask.width / 2 - 35) * Math.cos(160 * Math.PI/180) + activeTask.width / 2
                    y: (activeTask.width / 2 - 35) * Math.sin(160 * Math.PI/180) + activeTask.width / 2
                    radiusX: activeTask.width / 2 - 35
                    radiusY: activeTask.width / 2 - 35
                    useLargeArc: true
                }
            }
        }
    

    model write in C++ and added in QML like so:
    rootContext()->setContextProperty("aTask", &activeTask);

    I update model and in PathView visible only first element. but if move element then visible all elements. How to fix it?

    How to get to rotate elements in one direction only?
    How to make visible certain element?

    I'm sorry for my bad English

    P 1 Reply Last reply 5 May 2015, 05:06
    0
    • T Trikrista
      4 May 2015, 21:03

      I have the code:

          PathView {
              id: view
              preferredHighlightBegin: 1
              preferredHighlightEnd: 1
              pathItemCount: Math.floor(Math.PI * activeTask.width * 340/(2 * 180 * 120))
              highlightRangeMode: PathView.ApplyRange//PathView.StrictlyEnforceRange
      
              anchors.fill: parent
              model: aTask.underTask
              delegate: delegateTask
      
              property int dragIndex: -1
      
              path: Path {
                  startX: (activeTask.width / 2 - 35) * Math.cos(200 * Math.PI/180) + activeTask.width / 2
                  startY: (activeTask.width / 2 - 35) * Math.sin(200 * Math.PI/180) + activeTask.width / 2
      
                  PathArc {
                      x: (activeTask.width / 2 - 35) * Math.cos(160 * Math.PI/180) + activeTask.width / 2
                      y: (activeTask.width / 2 - 35) * Math.sin(160 * Math.PI/180) + activeTask.width / 2
                      radiusX: activeTask.width / 2 - 35
                      radiusY: activeTask.width / 2 - 35
                      useLargeArc: true
                  }
              }
          }
      

      model write in C++ and added in QML like so:
      rootContext()->setContextProperty("aTask", &activeTask);

      I update model and in PathView visible only first element. but if move element then visible all elements. How to fix it?

      How to get to rotate elements in one direction only?
      How to make visible certain element?

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 5 May 2015, 05:06 last edited by p3c0 5 May 2015, 05:07
      #2

      Hi @Trikrista,

      I update model and in PathView visible only first element. but if move element then visible all elements. How to fix it?

      I guess this could be the problem with pathItemCount. The value must be evaluating to a non expected result. Possibly related to activeTask.width. For testing try hard coding the value.

      How to get to rotate elements in one direction only?

      AFAIK there is no such feature yet.

      How to make visible certain element?

      Use positionViewAtIndex.

      157

      1 Reply Last reply
      1

      2/2

      5 May 2015, 05:06

      • Login

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