title: Initialize QVector from array
body: <p>I receive an array as a pointer from a function and want to initialize a QVector from that.</p>
  
  <p>For now I do it like this:</p>
  
  <pre><code>void foo(double* receivedArray, size_t size)
  {
      QVector&lt;double&gt; vec(size);
  
      std::copy(receivedArray, receivedArray + size, std::begin(vec));
  }
  </code></pre>
  
  <p>Would it be equally possible to do this:</p>
  
  <pre><code>void foo(double* receivedArray, size_t size)
  {
      QVector&lt;double&gt; vec(size);
  
      vec.data() = receivedArray;
  }
  </code></pre>
  
  <p>Would this break some kind of Qt mechanism that I am not aware of?</p>