QML animations visible property changes

前端 未结 6 1226
太阳男子
太阳男子 2021-02-13 08:52

I want an animation to be painted when an element becomes visible (is should appear smoothly, not the whole at all)

I tried this

states: State
{
    name         


        
6条回答
  •  醉梦人生
    2021-02-13 09:44

    Item {
    
     scale: visible ? 1.0 : 0.1
     Behavior on scale { 
       NumberAnimation  { duration: 500 ; easing.type: Easing.InOutBounce  } 
      }
    
    }
    

    does the trick for me.

提交回复
热议问题