<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div>Hi there</div><div><br></div><div>I tried to save a point type in a listmodel but when reading the value from the list I get a error saying something like "undefined". This error happens in my intex aqua fish.</div><div>It does work on desktop and android.</div><div><br></div><div>My code is something like this:</div><div><br></div><div><span>
<pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment--><span style=" color:#800080;"> ListModel</span><span style=" color:#c0c0c0;"> </span>{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">id</span>:<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">obstaclesList</span></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">//obstacles</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">are</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">rectangles</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">that</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">cannot</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">be</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">transposed,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">like</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">walls</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">for</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">example</span></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">//l</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">is</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">the</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">top</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">left</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">coordinate</span></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">//r</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">is</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">the</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">bottom</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">right</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">coordinate</span></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span>}</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">function</span><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">addObstacle</span>(l,<span style=" color:#c0c0c0;"> </span>r)<span style=" color:#c0c0c0;"> </span>{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">//console.log("adding</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">obstacles</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">to</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">list")</span></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">obstaclesList</span>.append({<span style=" color:#008000;">"l"</span>:<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#2985c7;">l</span>,<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"r"</span>:<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#2985c7;">r</span>})</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span>}</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">function</span><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">clearObstacles</span>()<span style=" color:#c0c0c0;"> </span>{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">obstaclesList</span>.clear()</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span>}</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">function</span><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">getObstacle</span>(i)<span style=" color:#c0c0c0;"> </span>{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">return</span><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">obstaclesList</span>.get(<span style=" font-style:italic; color:#2985c7;">i</span>)</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;"> </span>}<!--EndFragment--></pre></span><br></div><div>......</div><div><br></div><div><span>
<pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment--><span style=" font-style:italic; color:#000080;">obstaclesList</span>.addObstacle(<span style=" font-style:italic; color:#000000;">mountain</span>.baseTL,<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">mountain</span>.baseBR) // baseTL and baseBR are Qt.point(....)<!--EndFragment--></pre></span><br></div><div>....</div><div><span>
<pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment--><span style=" font-style:italic; color:#000080;">obstaclesList</span>.getObstacle(<span style=" font-style:italic; color:#2985c7;">i</span>).l // <- this line is where it fails<!--EndFragment--></pre></span><br></div><div>I solve this problem by changing the code to <span style="white-space: pre-wrap;">add / get real types instead of point. </span></div><div><span style="white-space: pre-wrap;">Just curious why this happen, inititally I tought it could be some arm limitation, but it does work good on a android mobile phone. Any ideias ?</span></div><div><span style="white-space: pre-wrap;"><br></span></div><div><span style="white-space: pre-wrap;">Br</span></div><div><span style="white-space: pre-wrap;">João</span></div></div></body></html>