[Qt-qml] QML JS Weirdness

Jason H scorp1us at yahoo.com
Fri Nov 19 01:44:12 CET 2010


The  following does not work. However is I replace the animationSet function 
with individual lines of {animation}.running = {value} then it works.
Also please the comment points out an annoyance.

Can anyone tell me if I am wong, or if QML is wrong. 
Qt 4.7.0

function animationSet(animations,value) 
    {
        for (var animation in [textAnimation, eyeAnimation, eyeOutline, 
pulseAnimation])
        {
            if (value == false && animation.running == true)
                // animations, when running== false and re-set to false
            {   // will emit Completed !?!1
                animation.running =  false;
            } else {
                animation.running = true;
            }
        }
    }
    function start() {
        stop();
        root.visible=true;
        animationSet([textAnimation, eyeAnimation, eyeOutline, pulseAnimation, 
mainAnimation], true);
        console.log("start called for "+ name);
    }



      



More information about the Qt-qml mailing list