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. Customizing PathView animation
Qt 6.12 LTS is out! See what's new in the release blog

Customizing PathView animation

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 3 Posters 1.3k 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.
  • M Offline
    M Offline
    Mark81
    wrote on last edited by Mark81
    #1

    I'm writing a sort of "carousel". Qt 6.2.0 under Ubuntu 20.04.
    So far this is my code:

    Component {
        id: delegate
    
        Item {
            id: item
            width: 864 * 0.6; height: 1536 * 0.6
    
            Image {
                width: parent.width * 0.95
                height: parent.height * 0.95
                source: modelData
                sourceSize: Qt.size(parent.width, parent.height)
                visible: true
                clip: false
            }
        }
    }
    
    PathView {
        id: view
        anchors.fill: parent
        anchors.bottomMargin: 150
        anchors.topMargin: 50
        pathItemCount: 3
        preferredHighlightBegin: 0.5
        preferredHighlightEnd: 0.5
        highlightRangeMode: PathView.StrictlyEnforceRange
        highlightMoveDuration: 3000
        snapMode: PathView.SnapToItem
        rotation: -90
        model:
            [
            base_path + "Resized80 03.png",
            base_path + "Resized80 04.png",
            base_path + "Resized80 05.png",
            base_path + "Resized80 06.png",
            base_path + "Resized80 08.png",
        ]
        delegate: delegate
        path: Path {
            startX: 0; startY: view.height / 2
            //PathAttribute { name: "iconScale"; value: 0.4 }
            //PathAttribute { name: "iconOpacity"; value: 0.0 }
            //PathAttribute { name: "iconOrder"; value: 0 }
            PathLine {x: view.width/2; y: view.height / 2 }
            //PathAttribute { name: "iconScale"; value: 1 }
            //PathAttribute { name: "iconOpacity"; value: 1 }
            //PathAttribute { name: "iconOrder"; value: 8 }
            PathLine {x: view.width; y: view.height / 2 }
        }
    }
    
    Timer {
        interval: 5000; running: true; repeat: true
        onTriggered: view.incrementCurrentIndex()
    }
    

    I didn't find a way to customize the animation. I would like to use the easing features for example, but I don't understand how to specify them. I only find the duration: highlightMoveDuration

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xinyangme
      wrote on last edited by
      #2

      Have you solved the current problem? I have the same problem but don't know how to fix it.

      M 1 Reply Last reply
      0
      • X xinyangme

        Have you solved the current problem? I have the same problem but don't know how to fix it.

        M Offline
        M Offline
        Mark81
        wrote on last edited by
        #3

        @xinyangme Unfortunately, I still have this problem and apparently nobody knows how to solve.

        X 1 Reply Last reply
        0
        • MarkkyboyM Offline
          MarkkyboyM Offline
          Markkyboy
          wrote on last edited by Markkyboy
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • M Mark81

            @xinyangme Unfortunately, I still have this problem and apparently nobody knows how to solve.

            X Offline
            X Offline
            xinyangme
            wrote on last edited by
            #5

            @Mark81 Is there any way you can replace or refer to it?

            M 1 Reply Last reply
            0
            • X xinyangme

              @Mark81 Is there any way you can replace or refer to it?

              M Offline
              M Offline
              Mark81
              wrote on last edited by
              #6

              @xinyangme sorry I don't understand your last question.

              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