P
P
Pavel K2020-04-01 01:01:10
Qt
Pavel K, 2020-04-01 01:01:10

Is it possible in QML to define inside a custom component that any of its properties are being animated?

Greetings!
In short, let's say there is a MyComp.qml component.
Any (or set) of its properties will change often and a lot (when changing which, a lot of things can be recalculated, for example, the list expands smoothly in height, and while it expands, a scrollbar appears, and when it expands completely, the scrollbar disappears. Therefore you need to turn off the display of the scrollbar while the height animation is in progress, otherwise visual garbage

appears.Now I have to set flags ( property bool hedeScrollRight and so on), which the animator has to remember to set to the desired state each time before / after the animation.How

can I get rid of a bunch of these here are the "flags"? As I see it, for example: "onHeightAnimation: { if (status===...) {....} }"
I rummaged through all the documentation, I didn’t find any way to determine whether the property is being animated or not (except for making a “wrapper” over each type of animation, so that when it starts / stops, target itself sets the flags).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question