<div dir="ltr"><div>Thanks Andrey!<br></div>Will test that too tonight.<br></div><div class="gmail_extra"><br clear="all"><div><br>// Peter Pykäläinen</div>
<br><div class="gmail_quote">On 6 October 2014 10:39, Andrey Kozhevnikov <span dir="ltr"><<a href="mailto:coderusinbox@gmail.com" target="_blank">coderusinbox@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    use<br>
    <br>
    <tt>property Item object1</tt><tt><br>
    </tt><tt>property Item object2</tt><tt><br>
    </tt><tt><br>
    </tt><tt>...</tt><tt><br>
    </tt><tt><br>
    </tt><tt>function createObjects() {</tt><tt><br>
    </tt><tt>
          object1 = component1.createObject(parent, paraneters)</tt><tt><br>
    </tt><tt>
          object2 = component2.createObject(parent, paraneters)</tt><tt><br>
    </tt><tt>    checkCollisionsFunction(object1, object2)</tt><tt><br>
    </tt><tt>}</tt><br>
    <br>
    <div>06.10.2014 12:26, Peter Pykäläinen
      пишет:<br>
    </div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>Hi,<br>
                        <br>
                      </div>
                      I have a problem with a dynamically created QML
                      object and referencing it.<br>
                    </div>
                    The problem is as follows:<br>
                    <br>
                  </div>
                  - Create a dynamic QML object with createObject,
                  assign signal to it. This works fine.<br>
                </div>
                - Create another dynamic QML object.<br>
              </div>
              - I would need to check collision of these two new
              objects, I am using a timer to check that.<br>
            </div>
            - Now since I can not reference both objects with their IDs
            I can't get the collision check to work.<br>
            <br>
          </div>
          Any ideas how to achive this?<br>
          <br>
        </div>
        I have tried to use a LlistModel to store all my objects, but
        looping through them with JavaScript slows down my application
        significantly, so this is not an option.<br clear="all">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div><br>
                            // Peter Pykäläinen</div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><span class=""><pre>_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a></pre>
    </span></blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br></blockquote></div><br></div>