<?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[eval() in qml]]></title><description><![CDATA[<p dir="auto">I want to inject js code to my application for test purposes.</p>
<p dir="auto">i wanted to use js eval() function but qt creator said <em><strong>don't use eval (M23)</strong></em></p>
<pre><code>ApplicationWindow{ // my app
  id:root
...
  property var warnings : "" 
  property int nbr : 0
...

    Window{// my testing window
    
      TextInput{
               id:cmd
                     // i want to write  root.warnings = "warn" 
                     //or  root.nbr = 666
      }
       Button{
        onClicked : eval(cmd.text) 
       }
    }
}
</code></pre>
<p dir="auto">is this possible with something else than <em>eval()</em><br />
thanks</p>
]]></description><link>https://forum.qt.io/topic/107420/eval-in-qml</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Apr 2026 18:30:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/107420.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Oct 2019 10:12:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to eval() in qml on Fri, 11 Oct 2019 07:25:23 GMT]]></title><description><![CDATA[<p dir="auto">It is an awesome tool ! <a class="plugin-mentions-user plugin-mentions-a" href="/user/grecko">@<bdi>GrecKo</bdi></a> thank you for the suggestion! i knew i will find a tool like this with the help of the forum guys, but this tool  even exceed my expectations</p>
]]></description><link>https://forum.qt.io/post/555582</link><guid isPermaLink="true">https://forum.qt.io/post/555582</guid><dc:creator><![CDATA[ODБOï]]></dc:creator><pubDate>Fri, 11 Oct 2019 07:25:23 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Thu, 10 Oct 2019 13:00:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> thx, i will try to build and test <strong>gammaray</strong> tomorrow</p>
]]></description><link>https://forum.qt.io/post/555421</link><guid isPermaLink="true">https://forum.qt.io/post/555421</guid><dc:creator><![CDATA[ODБOï]]></dc:creator><pubDate>Thu, 10 Oct 2019 13:00:58 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Wed, 09 Oct 2019 05:07:03 GMT]]></title><description><![CDATA[<p dir="auto">@LeLev said in <a href="/post/554986">eval() in qml</a>:</p>
<blockquote>
<p dir="auto">should i use my Qt mingw or a standalone mingw here ?</p>
</blockquote>
<p dir="auto">The one delivered with Qt</p>
]]></description><link>https://forum.qt.io/post/555078</link><guid isPermaLink="true">https://forum.qt.io/post/555078</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 09 Oct 2019 05:07:03 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Tue, 08 Oct 2019 15:12:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/grecko">@<bdi>GrecKo</bdi></a> how to build it ?  My QtQuick project uses <strong>Qt 13.0</strong> and <strong>mingw73_64</strong><br />
there is a Install.txt file in the project it says :</p>
<pre><code> // Building on Windows with MinGW:
//Make sure you have the path to the MinGW programs in %PATH% first, for example:
% set "PATH=c:\MinGW\mingw64\bin;%PATH%"
Now build:
% mkdir build
% cd build
% cmake -G "MinGW Makefiles" ..
% mingw32-make
% mingw32-make install
</code></pre>
<p dir="auto">should i use my Qt mingw or a standalone mingw here ?</p>
]]></description><link>https://forum.qt.io/post/554986</link><guid isPermaLink="true">https://forum.qt.io/post/554986</guid><dc:creator><![CDATA[ODБOï]]></dc:creator><pubDate>Tue, 08 Oct 2019 15:12:16 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Tue, 08 Oct 2019 14:58:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/grecko">@<bdi>GrecKo</bdi></a> said in <a href="/post/554978">eval() in qml</a>:</p>
<blockquote>
<p dir="auto">have you checked <a href="https://www.kdab.com/development-resources/qt-tools/gammaray/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.kdab.com/development-resources/qt-tools/gammaray/</a> ?</p>
</blockquote>
<p dir="auto">No, i will.<br />
thank you</p>
]]></description><link>https://forum.qt.io/post/554984</link><guid isPermaLink="true">https://forum.qt.io/post/554984</guid><dc:creator><![CDATA[ODБOï]]></dc:creator><pubDate>Tue, 08 Oct 2019 14:58:37 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Tue, 08 Oct 2019 14:29:09 GMT]]></title><description><![CDATA[<p dir="auto">If you want to modify property for some live debugging, have you checked <a href="https://www.kdab.com/development-resources/qt-tools/gammaray/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.kdab.com/development-resources/qt-tools/gammaray/</a> ?</p>
]]></description><link>https://forum.qt.io/post/554978</link><guid isPermaLink="true">https://forum.qt.io/post/554978</guid><dc:creator><![CDATA[GrecKo]]></dc:creator><pubDate>Tue, 08 Oct 2019 14:29:09 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Tue, 08 Oct 2019 14:13:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcarney">@<bdi>fcarney</bdi></a> thx,</p>
<p dir="auto">i found exactly what i need, but not tested yet <a href="https://github.com/qtproject/qt-solutions/tree/master/qtpropertybrowser" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/qtproject/qt-solutions/tree/master/qtpropertybrowser</a></p>
<p dir="auto">do you know this project ? do you think i can use it with qtquick project ?</p>
]]></description><link>https://forum.qt.io/post/554971</link><guid isPermaLink="true">https://forum.qt.io/post/554971</guid><dc:creator><![CDATA[ODБOï]]></dc:creator><pubDate>Tue, 08 Oct 2019 14:13:51 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Tue, 08 Oct 2019 13:54:38 GMT]]></title><description><![CDATA[<p dir="auto">@LeLev said in <a href="/post/554298">eval() in qml</a>:</p>
<blockquote>
<p dir="auto">I want to inject js code to my application for test purposes.</p>
</blockquote>
<p dir="auto">Sorry, I totally missed that and went to the code.  Maybe you can do it from the C++ side?  Return the results to the QML side?</p>
]]></description><link>https://forum.qt.io/post/554965</link><guid isPermaLink="true">https://forum.qt.io/post/554965</guid><dc:creator><![CDATA[fcarney]]></dc:creator><pubDate>Tue, 08 Oct 2019 13:54:38 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Thu, 03 Oct 2019 19:12:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcarney">@<bdi>fcarney</bdi></a> said in <a href="/post/554290">eval() in qml</a>:</p>
<blockquote>
<p dir="auto">?!</p>
</blockquote>
<p dir="auto">yes (i am the user), see my first comment</p>
<p dir="auto">@LeLev said in <a href="/post/554206">eval() in qml</a>:</p>
<blockquote>
<p dir="auto">I want to inject js code to my application for test purposes.</p>
</blockquote>
]]></description><link>https://forum.qt.io/post/554298</link><guid isPermaLink="true">https://forum.qt.io/post/554298</guid><dc:creator><![CDATA[ODБOï]]></dc:creator><pubDate>Thu, 03 Oct 2019 19:12:20 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Thu, 03 Oct 2019 18:39:32 GMT]]></title><description><![CDATA[<p dir="auto">@LeLev said in <a href="/post/554212">eval() in qml</a>:</p>
<blockquote>
<p dir="auto">evaluate(cmd.text)</p>
</blockquote>
<p dir="auto">You want to eval user inputted text?!  Are you going to vet that text?</p>
]]></description><link>https://forum.qt.io/post/554290</link><guid isPermaLink="true">https://forum.qt.io/post/554290</guid><dc:creator><![CDATA[fcarney]]></dc:creator><pubDate>Thu, 03 Oct 2019 18:39:32 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Tue, 08 Oct 2019 14:14:18 GMT]]></title><description><![CDATA[<p dir="auto">i just saw this project  <a href="https://github.com/qtproject/qt-solutions/tree/master/qtpropertybrowser" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/qtproject/qt-solutions/tree/master/qtpropertybrowser</a></p>
<p dir="auto">this is exactly what i need, does someone know if i can use this with QtQuick QML application ?</p>
]]></description><link>https://forum.qt.io/post/554250</link><guid isPermaLink="true">https://forum.qt.io/post/554250</guid><dc:creator><![CDATA[ODБOï]]></dc:creator><pubDate>Tue, 08 Oct 2019 14:14:18 GMT</pubDate></item><item><title><![CDATA[Reply to eval() in qml on Thu, 03 Oct 2019 10:18:38 GMT]]></title><description><![CDATA[<p dir="auto">ah...<br />
wrapping  eval()  solved this</p>
<pre><code>ApplicationWindow{ // my app
  id:root
...
  property var warnings : "" 
  property int nbr : 0
...

    Window{// my testing window
    
      TextInput{
               id:cmd
                     // i want to write  root.warnings = "warn" 
                     //or  root.nbr = 666
      }
       Button{
                  function evaluate(str){eval(str)} // wrap
        onClicked : evaluate(cmd.text) 
       }
    }
}
</code></pre>
<p dir="auto">however qt creator still rises the warning</p>
]]></description><link>https://forum.qt.io/post/554212</link><guid isPermaLink="true">https://forum.qt.io/post/554212</guid><dc:creator><![CDATA[ODБOï]]></dc:creator><pubDate>Thu, 03 Oct 2019 10:18:38 GMT</pubDate></item></channel></rss>