title: Call by reference with QVector
body: <p>I have in an Object an QVector of Coordinates (my type) that I want to transfer to an other Vector ( I validate and than want to use ist ). </p>
  
  <p>Header</p>
  
  <pre><code>bool getVector(QVector&lt;Coordinates&gt; &amp;getCoordinates );
  </code></pre>
  
  <p>C File</p>
  
  <pre><code>static QVector&lt;Coordinates&gt; current;
  
  
  int getVector( QVector&lt;Coordinates&gt; &amp;getCoordinates)
  {
  
  .... stuff ...
  
   getCoordinates = current;
  
  .... stuff ....
  return 0;
  }
  </code></pre>
  
  <p>And I use it like</p>
  
  <pre><code>....
  
  QVector&lt;Coordinates&gt; currentCoordinates;
  getVector(currentCoordinates);
  
  currentCoordinates.X // CRASH
  </code></pre>
  
  <p>The debugger goes to this line where an Live Crash happens</p>
  
  <pre><code>  inline QVector(const QVector&lt;T&gt; &amp;v) : d(v.d) { d-&gt;ref.ref(); if (!d-&gt;sharable) detach_helper(); }
  </code></pre>
  
  <p>So my how can I fix this? As I can use this to get all the other Variables with this methode.</p>