title: Converting QList to QVariant
body: <p>The class contains this:</p>
  
  <p><code>Q_PROPERTY(QList&lt;double&gt;  switch1  READ switch1 WRITE setSwitch1 NOTIFY switch1Changed)</code></p>
  
  <pre><code>void setSwitch2(QList&lt;double&gt; arg)
  {
      if (m_switch2 != arg)
      {
          m_switch2 = arg;
          emit switch2Changed(arg);
      }
  }
  </code></pre>
  
  <p>The below works:</p>
  
  <pre><code>setSwitch2(QList&lt;double&gt;::fromVector(QVector&lt;double&gt;::fromStdVector(data-&gt;switch2)));
  </code></pre>
  
  <p>but now my datatype is <code>QVariantList</code> instead of <code>QList&lt;double&gt;</code>.</p>
  
  <p><strong>How should I replace QList with QVariant now?</strong></p>
  
  <p>This doesn't work:</p>
  
  <pre><code>setSwitch1(QVariantList::fromVector(QVector&lt;QVariant&gt;::fromStdVector(data-&gt;switch1)));
  </code></pre>