<?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[Incrementing object values]]></title><description><![CDATA[<p dir="auto">Hello all,<br />
Im starting now with QML programming and have small beginner problem. I think I still simply do not get bindig thing :)</p>
<p dir="auto">What I want to do:<br />
In case of each pressing button I want to rotate some image by adding additional 45 degrees. But how I can increment the rotation value?<br />
@<br />
states: State{<br />
name: "move"<br />
PropertyChanges {<br />
target: buttonImage<br />
rotation: 45<br />
}<br />
}</p>
<p dir="auto">Currently I got smthg like:<br />
transitions: Transition {<br />
RotationAnimation{<br />
duration: 500<br />
direction: RotationAnimation.Clockwise<br />
}<br />
@</p>
<p dir="auto">If I set: rotation: buttonImage + 45 i got binding loop.</p>
<p dir="auto">Anybody knows?<br />
BR<br />
Thomas</p>
]]></description><link>https://forum.qt.io/topic/40613/incrementing-object-values</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 14:34:26 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/40613.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Apr 2014 15:24:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Incrementing object values on Wed, 23 Apr 2014 15:58:58 GMT]]></title><description><![CDATA[<p dir="auto">Ahh sry :)<br />
My bad.<br />
You are right...<br />
Didnt read to the end :P</p>
]]></description><link>https://forum.qt.io/post/224612</link><guid isPermaLink="true">https://forum.qt.io/post/224612</guid><dc:creator><![CDATA[Kaluss]]></dc:creator><pubDate>Wed, 23 Apr 2014 15:58:58 GMT</pubDate></item><item><title><![CDATA[Reply to Incrementing object values on Wed, 23 Apr 2014 15:51:37 GMT]]></title><description><![CDATA[<p dir="auto">Ok, its working, but it doesn't animate the transform like when we use:<br />
@<br />
states: State{<br />
name: "move"<br />
PropertyChanges {<br />
target: buttonImage<br />
rotation: 45<br />
}<br />
}<br />
transitions: Transition {<br />
RotationAnimation{<br />
duration: 500<br />
direction: RotationAnimation.Clockwise<br />
}<br />
}<br />
@</p>
<p dir="auto"><em>[edit: added missing coding tags SGaist]</em></p>
]]></description><link>https://forum.qt.io/post/224613</link><guid isPermaLink="true">https://forum.qt.io/post/224613</guid><dc:creator><![CDATA[Kaluss]]></dc:creator><pubDate>Wed, 23 Apr 2014 15:51:37 GMT</pubDate></item><item><title><![CDATA[Reply to Incrementing object values on Wed, 23 Apr 2014 15:44:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">@<br />
import QtQuick 2.1<br />
import QtQuick.Window 2.1<br />
import QtQuick.Controls 1.1</p>
<p dir="auto">Window {<br />
visible: true<br />
width: 360<br />
height: 400</p>
<pre><code>color: "grey"

Button {
    id: myButton

    anchors.horizontalCenter: parent.horizontalCenter
    anchors.top: parent.top
    anchors.topMargin: 20

    text: "rotate the box"

    onClicked: box.rotation = box.rotation + 45
}

// can be replaced by image
Rectangle {
    id: box

    width: 100
    height: 100

    color: "blue"

    y: 200
    x: (parent.width - width) / 2

    Behavior on rotation {
        NumberAnimation { duration: 200 }
    }
}
</code></pre>
<p dir="auto">}<br />
@</p>
]]></description><link>https://forum.qt.io/post/224609</link><guid isPermaLink="true">https://forum.qt.io/post/224609</guid><dc:creator><![CDATA[stevenceuppens]]></dc:creator><pubDate>Wed, 23 Apr 2014 15:44:10 GMT</pubDate></item><item><title><![CDATA[Reply to Incrementing object values on Wed, 23 Apr 2014 15:38:41 GMT]]></title><description><![CDATA[<p dir="auto">Like I said before:<br />
QML Image: Binding loop detected for property "rotation"</p>
]]></description><link>https://forum.qt.io/post/224605</link><guid isPermaLink="true">https://forum.qt.io/post/224605</guid><dc:creator><![CDATA[Kaluss]]></dc:creator><pubDate>Wed, 23 Apr 2014 15:38:41 GMT</pubDate></item><item><title><![CDATA[Reply to Incrementing object values on Wed, 23 Apr 2014 15:37:34 GMT]]></title><description><![CDATA[<p dir="auto">rotation: rotation + 45<br />
Does it work?</p>
]]></description><link>https://forum.qt.io/post/224606</link><guid isPermaLink="true">https://forum.qt.io/post/224606</guid><dc:creator><![CDATA[Vincent007]]></dc:creator><pubDate>Wed, 23 Apr 2014 15:37:34 GMT</pubDate></item></channel></rss>