title: set QVector data with double* without memory copying
body: <p>I have an structure <strong>MyVect</strong> and I am looking to convert my structure <strong>MyVect</strong> to an QVector varibale without making a copy of the memory.</p>
  
  <p>I want to use the same memory reserved by the QVector already initialize.</p>
  
  <pre><code>typedef struct MyVect
  {
    int size;
    double *data;
  }vect;
  </code></pre>
  
  <p>something like that</p>
  
  <pre><code>QVector&lt;double&gt; v;
  
  MyVect *vect = new MyVect;
  double *val = new double(4);
  for(int i =0; i &lt;4; i++)
  {
    val[i] = i;
  }
  vect-&gt;size = 4;
  vect-&gt;data = val;
  
  v.data() = vect-&gt;data;// &lt;==example not correct
  </code></pre>
  
  <p>thank for your help in advance</p>