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. [Qt5] PathView flicks very very slow at some point
Forum Updated to NodeBB v4.3 + New Features

[Qt5] PathView flicks very very slow at some point

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

    The code works well when Qt 4.

    It's like an advertising column.

    @
    import QtQuick 2.0

    Rectangle {
    id: desktop
    width: 1258
    height: 697
    color: "red"

    ListModel {
    id: ads_model
    ListElement {
    color: "green"
    }
    ListElement {
    color: "blue"
    }
    ListElement {
    color: "yellow"
    }
    }

    PathView {
    id: path_view
    anchors.fill: parent
    model: ads_model
    delegate: Rectangle {
    id: homepage_game
    width: 878;
    height: 405
    z: 2 + index / 10
    scale: PathView.scale
    color: model.color
    }

    focus: true

         preferredHighlightBegin: 0.5
         preferredHighlightEnd: 0.5
    

    flickDeceleration: 380

        path: Path {
    

    startX: 180 - (ads_model.count - 1) * 440; startY: 280
    PathAttribute { name: "scale"; value: 0.618 }
    PathLine { x: desktop.width / 2; y: 280 }
    PathAttribute { name: "scale"; value: 1.0 }
    PathLine { x: desktop.width - 180 + (ads_model.count - 1) * 440; y: 280 }
    }
    }
    }
    @

    There are 3 rectangles that can be horizontally dragged. Whenever releasing the mouse, the rectangle flicks to the left or right (according to its position)

    Normally, it works well. But occasionally there's a problem:

    I try to drag a rectangle to such a position, that about half of this rectangle can be seen ( the other half is clipped by the window ), then the rectangle moves to the destination position at a very low speed.

    This position is not easy to be found so the 'low speed situation' is not easy to reproduce. I can reproduce it after trying about 5 times. The 'slow' is quite obvious compared to the normal situation.

    When I'm using Qt4, there's no such situation.. Is it a bug of Qt5, or the usage of PathView changed in Qt5 ?

    I'm using WinXP.

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