Problem with property bool
Hi
This is my code:
Code:
import Qt 4.7
Item {
width: 180
height: 60
id: root
property bool collapsedButton: true
(...)
ParallelAnimation {
running:root.collapsedButton
NumberAnimation { target: backgroundCallapsed; property: "width"; to: 64 ;}
NumberAnimation { target: background; property: "opacity"; to: 0 }
NumberAnimation { target: text; property: "opacity"; to: 0 }
}
(...)
Thie code does not work, but when I change "root.collapsedButton" form running to "true" this script work
Re: Problem with property bool
Define what "does not work" mean. Do you get any errors at the console?
Re: Problem with property bool
Aniamtion don't run. Console is empty. Variable "collapsedButton" contains value "true", but animation don't start.
I tried this:
Code:
import Qt 4.7
Item {
width: 180
height: 60
id: root
property bool collapsedButton: true
(...)
ParallelAnimation {
running:{
if(root.collapsedButton == true){
true
}else{
false
}
NumberAnimation { target: backgroundCallapsed; property: "width"; to: 64 ;}
NumberAnimation { target: background; property: "opacity"; to: 0 }
NumberAnimation { target: text; property: "opacity"; to: 0 }
}
(...)
but aniamtion don't start too.