[Development] Improve performance (listview + onVerticalVelocityChanged)

Ulf Hermann ulf.hermann at qt.io
Mon Jan 30 11:23:34 CET 2017


Am 26.01.2017 um 20:09 schrieb Bernhard B:
> I think I solved my problem. In case someone is interested, that's my 
> solution:

Can't you bind the "visible" properties to the velocity? Then it doesn't 
have to execute so much javascript and the code looks cleaner and more 
declarative. The bindings will still be executed on every change in 
velocity, but it's likely that they'll be better optimized:

Something {
id: backToTopButton
visible: listView.verticalVelocity < -flickTabBarThreshold
}

SomethingElse {
id: tabBar
visible: backToTopButton.visible
}

br,
Ulf



More information about the Development mailing list