<?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[NumberAnimation can&#x27;t refer to its parent SequentalAnimation]]></title><description><![CDATA[<p dir="auto">My code:</p>
<pre><code>import QtQuick 2.5
import QtQuick.Window 2.2

Window {
    visible: true
    width: 640
    height: 480
    property double angle: 0
    
    SequentialAnimation on angle {
        property int myDuration: 3000 // const
        NumberAnimation {
            from: -30.0
            to: 30.0
            duration: parent.myDuration
            easing.type: Easing.InOutSine
        }
    }
}
</code></pre>
<p dir="auto">I get this error on the "<code>parent.myDuration</code>" line:</p>
<blockquote>
<p dir="auto">ReferenceError: parent is not defined</p>
</blockquote>
<p dir="auto">Any ideas?</p>
]]></description><link>https://forum.qt.io/topic/71804/numberanimation-can-t-refer-to-its-parent-sequentalanimation</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Nov 2026 21:24:48 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/71804.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Sep 2016 16:49:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to NumberAnimation can&#x27;t refer to its parent SequentalAnimation on Sat, 01 Oct 2016 13:24:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kshegunov">@<bdi>kshegunov</bdi></a> :<br />
Sure, that works, but I was wondering why it doesn't work with <code>parent</code> as well.</p>
<p dir="auto">@Wieland :<br />
Ok, thanks!</p>
]]></description><link>https://forum.qt.io/post/351298</link><guid isPermaLink="true">https://forum.qt.io/post/351298</guid><dc:creator><![CDATA[Stefan Monov76]]></dc:creator><pubDate>Sat, 01 Oct 2016 13:24:04 GMT</pubDate></item><item><title><![CDATA[Reply to NumberAnimation can&#x27;t refer to its parent SequentalAnimation on Fri, 30 Sep 2016 17:32:06 GMT]]></title><description><![CDATA[<p dir="auto">Hi! The <code>parent</code> property is the <em>visual parent</em> of the basic visual QML type <code>Item</code> and must not be confused with the parent QObject in a QObject tree. The <code>Animation</code> QML type is not derived from <code>Item</code> (because it has no visual representation) and thus does not have a visual parent / no <code>parent</code> property.</p>
]]></description><link>https://forum.qt.io/post/351160</link><guid isPermaLink="true">https://forum.qt.io/post/351160</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Fri, 30 Sep 2016 17:32:06 GMT</pubDate></item><item><title><![CDATA[Reply to NumberAnimation can&#x27;t refer to its parent SequentalAnimation on Fri, 30 Sep 2016 17:08:49 GMT]]></title><description><![CDATA[<p dir="auto">Tried referencing by <code>id</code>?</p>
]]></description><link>https://forum.qt.io/post/351156</link><guid isPermaLink="true">https://forum.qt.io/post/351156</guid><dc:creator><![CDATA[kshegunov]]></dc:creator><pubDate>Fri, 30 Sep 2016 17:08:49 GMT</pubDate></item></channel></rss>