In qml GridView,which property will influence scroll speed?
-
hi everyone! i use QML GridView write a application program on cellphone,but when i drag the screen,it scrolls very slow,so i want to ask you which property will influence scroll speed in GridView?thank you very much!
-
you can use the listview .and set the contentX or contentY dirently when drag event accurs
-
Take a look at "horizontalVelocity and verticalVelocity":http://doc.trolltech.com/4.7-snapshot/qml-flickable.html#horizontalVelocity-prop
-
but this horizontalVelocity and verticalVelocity propertise is just
read-only,we cann't assign to it! -
Ohh, I
m sorry. I didn
t see the read-only flag :(There is also maximumFlickVelocity property. It is not read-only. May it will help :)
-
"GridView.maximumFlickVelocity":http://doc.qt.nokia.com/4.7-snapshot/qml-flickable.html#maximumFlickVelocity-prop
-
but why it also slow,it seems have not change!
-
Have you tried building a Desktop version of your application?
If velocity does not change it is most likely a software problem.
If velocity changes it is most likely a hardware problem (limited resources). -
i did a test,when i just use a ListView,the speed is ok,but when i use two views which are GridView and ListView,it response very slow,so how to solve this problem?
-
You can use cacheBuffer to cache some delegates outside visible area.That can help in smooth scrolling.
How complex is your grid delegate ? Simpler the delegate better will be scrolling.
9/10