QML: ListView Flickable Item: Swiping/Flicking on the screen receives 'ContentX' value as 0 from Qt.
-
Hey all,
So I'm using Flickable QML type :https://doc.qt.io/qt-5/qml-qtquick-flickable.html to achieve swiping/flicking between the pages in my application.
The swipe is only horizontal and so on flick I use 'ContentX' to start a NumberAnimation to change the pages.
But on some occasions, the value of this 'ContentX' is always 0 and another property 'moving' is also received as false. Horizontal velocity is also 0.
Since there's no change in the contentX value, the number animation doesn't starts and so the page seems to be not responding on certain swipes due to this.
Though when this problem occurs, all other signals are well received.
Please help for any references on how to debug or where the issue could be. -
Hi and welcome to devnet,
You should:
- add the version of Qt you are using
- the OS you are running your application on
- a minimal compilable example that shows your issue
-
Hi and welcome to devnet,
You should:
- add the version of Qt you are using
- the OS you are running your application on
- a minimal compilable example that shows your issue
Hi @SGaist
- I'm using Qt5.6.3
- running the application on Windows WINCE 7.
Example :
ListView {
id: listView
orientation: ListView.Horizontal
snapMode: ListView.SnapOneItem
clip: true
}NumberAnimation {
id: pageChangeAnimation
target: listView
property: "contentX"
duration: 500
easing.type: Easing.OutExpo
} -
That's quite an old version of Qt.
Do you have an animation that shows what you are trying to achieve ? I am wondering whether you might be using the wrong tool.
-
That's quite an old version of Qt.
Do you have an animation that shows what you are trying to achieve ? I am wondering whether you might be using the wrong tool.