<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Transition onRunningChanged only call new.state for specific State name [solved]]]></title><description><![CDATA[<p dir="auto">I'm using the code below for an animation of a specific mousearea. When the mousearea is clicked the animated is fired and when completed the state1 is called. This works fine but I also have a back mousearea that returns to the previous state (base state) when the back mousearea is clicked the animation is called again but to return the image to its original state. The problem is state1 is called again after the animation is completed.</p>
<p dir="auto">how can I do something like<br />
@<br />
....<br />
onRunningChanged: if(!running &amp;&amp; !"rotated_back")  page.state = 'State1'</p>
<p dir="auto">...@</p>
<p dir="auto">here is the code which pertains to my issue.</p>
<p dir="auto">@<br />
Image {id: image6; x: 59; y: 33; width: 100; height: 100; source: "images/mm.png"<br />
states: State {<br />
name: "rotated"<br />
PropertyChanges { target: image6; rotation: 180}<br />
}<br />
State{<br />
name: "rotated_back"<br />
PropertyChanges {  target: image6; rotation: 180 }</p>
<pre><code>                   }
            transitions: Transition {
                       RotationAnimation { duration: 1000; direction: RotationAnimation.clockwise }
                       onRunningChanged: if(!running)  page.state = 'State1'
                   }
            }
</code></pre>
<p dir="auto">......</p>
<p dir="auto">MouseArea {<br />
id: movie_mouse_mm<br />
x: 392<br />
y: 250<br />
width: 104<br />
height: 100<br />
onClicked:{<br />
image6.state = "rotated"<br />
playbanner.start()<br />
<a href="//page.state" target="_blank" rel="noopener noreferrer nofollow ugc">//page.state</a> = 'State1'<br />
Logic.get_db(5,0);<br />
}<br />
}<br />
....<br />
MouseArea {id: home_mouse; x: 16; y: 31; width: 75; height: 42;<br />
onClicked:{<br />
page.state = 'base state'<br />
onClicked: image6.state = "rotated_back";<br />
}<br />
}<br />
@</p>
]]></description><link>https://forum.qt.io/topic/28011/transition-onrunningchanged-only-call-new-state-for-specific-state-name-solved</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 19:07:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/28011.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Jun 2013 19:01:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Transition onRunningChanged only call new.state for specific State name [solved] on Thu, 06 Jun 2013 20:45:31 GMT]]></title><description><![CDATA[<p dir="auto">You sir are amazing.</p>
]]></description><link>https://forum.qt.io/post/181880</link><guid isPermaLink="true">https://forum.qt.io/post/181880</guid><dc:creator><![CDATA[dstudentx]]></dc:creator><pubDate>Thu, 06 Jun 2013 20:45:31 GMT</pubDate></item><item><title><![CDATA[Reply to Transition onRunningChanged only call new.state for specific State name [solved] on Thu, 06 Jun 2013 19:35:47 GMT]]></title><description><![CDATA[<p dir="auto">Try<br />
@<br />
....<br />
onRunningChanged: if(!running &amp;&amp; (image6.state !== "rotated_back"))  page.state = 'State1'</p>
<p dir="auto">...<br />
@</p>
]]></description><link>https://forum.qt.io/post/181874</link><guid isPermaLink="true">https://forum.qt.io/post/181874</guid><dc:creator><![CDATA[JapieKrekel]]></dc:creator><pubDate>Thu, 06 Jun 2013 19:35:47 GMT</pubDate></item></channel></rss>