Connect state animation to slider or something number changing event
-
Hello experts,
Do you know if there is a way to connect PropertyChanges or something same animation to slider or another number changing event to rotate something or move using state and transitions animations but with using slider also?
For example in Android material design we have hamburger-back button with animation which one also changing accordingly to LeftPane movement.
Thanks for any help.
-
Hi @svyatoslav911512
You can bindSlider
's value to that ofItem
'srotation
property. For eg:import QtQuick 2.4 import QtQuick.Controls 1.3 Item { width: 200 height: 200 Slider { id: slider } Rectangle { width: 50 height: 50 color: "red" antialiasing: true anchors.centerIn: parent rotation: slider.value*180 } }
Hope I understood you correctly :)
-
@svyatoslav911512 You can read more about property binding here. Happy coding..