<?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[Get the binding expression of the property]]></title><description><![CDATA[<p dir="auto">Is it possible, using C++ backend, to get the value of the expression used for binding at some property.<br />
Suppose I have a:</p>
<pre><code>property var test: x * 10 + y * 20
</code></pre>
<p dir="auto">When I call QMetaProperty::read and QQmlProperty::read, I get the already calculated value of the property. Is there any way to get a QJSValue that calculates this value? (in my example, I want to get "x * 10 + y * 20").</p>
]]></description><link>https://forum.qt.io/topic/154977/get-the-binding-expression-of-the-property</link><generator>RSS for Node</generator><lastBuildDate>Sun, 14 Jun 2026 00:49:10 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/154977.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 Feb 2024 07:42:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Get the binding expression of the property on Tue, 05 Mar 2024 14:32:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/grecko">@<bdi>GrecKo</bdi></a> maybe you can suggest, is there any way to know if a property uses a binding to another property or not?</p>
<pre><code>property int x1: 100
property int x2: x1
</code></pre>
<p dir="auto">using QMetaProperty does not help to distinguish between these properties</p>
]]></description><link>https://forum.qt.io/post/792177</link><guid isPermaLink="true">https://forum.qt.io/post/792177</guid><dc:creator><![CDATA[TurashviliAlik]]></dc:creator><pubDate>Tue, 05 Mar 2024 14:32:46 GMT</pubDate></item><item><title><![CDATA[Reply to Get the binding expression of the property on Tue, 05 Mar 2024 10:04:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/grecko">@<bdi>GrecKo</bdi></a> I apologize for not responding for so long.<br />
I need this for my dynamic debugging module. Also, several times I have encountered a situation where I need to copy a bind expression from one property to another. That is, not to bind one property to another, but to copy the expression used in Qt.binding() for target property.</p>
]]></description><link>https://forum.qt.io/post/792127</link><guid isPermaLink="true">https://forum.qt.io/post/792127</guid><dc:creator><![CDATA[TurashviliAlik]]></dc:creator><pubDate>Tue, 05 Mar 2024 10:04:15 GMT</pubDate></item><item><title><![CDATA[Reply to Get the binding expression of the property on Fri, 01 Mar 2024 09:26:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/turashvilialik">@<bdi>TurashviliAlik</bdi></a> Why do you want it? Do you really want the string or way to evaluate it later?</p>
<p dir="auto">There's QQmlScriptString and QQmlExpression.</p>
<p dir="auto">Or you could have QJSValue and pass it a function instead:</p>
<pre><code>property var test: () =&gt; x * 10 + y * 20 // or (x, y) =&gt; x * 10 + y * 20 
</code></pre>
]]></description><link>https://forum.qt.io/post/791818</link><guid isPermaLink="true">https://forum.qt.io/post/791818</guid><dc:creator><![CDATA[GrecKo]]></dc:creator><pubDate>Fri, 01 Mar 2024 09:26:30 GMT</pubDate></item></channel></rss>