Is there any way to make Behavior work on multiple attributes simultaneously to simplify the code?
ApplicationWindow { width: 1280 height: 720 visible: true title: qsTr("Hello World") color:"#202020" Rectangle{ id:rect x:100 y:100 width: 100 height: 50 color:"red" Behavior on x, y, width, height, color{ //there will be error here PropertyAnimation{duration:1000} } } Button{ onClicked: { rect.x=300 rect.y=400 rect.width=200 rect.height100 rect.color="green" } }}
I want all 5 attributes to have a smooth change effect, so I have to define 5 Behaviors and apply them to each of these 5 properties separately, I think this is troublesome.