title: Store QList<T> in QVariant and stream to QDataStream?
body: <p>Here's the demo code:</p>
  
  <pre><code>QList&lt;Custom&gt; L;
  QVariant v(QVariant::fromValue(l));
  QDataStream d;
  d &lt;&lt; v;
  </code></pre>
  
  <p>The problem seems to be that d doesn't know how to stream v, because v doesn't know how to do a metatype save on L. I have registered Custom and L as metatypes and I've also registered their IO streams, but L has no meta object, and I think that is the problem. </p>
  
  <p>Can I get around this somehow?</p>
  
  <p><strong>Later edit:</strong><br>
  After debugging the QMetaType code, I've found out that when calling <code>qRegisterMetaTypeStreamOperators&lt;Type&gt;("TypeString")</code> "TypeString" must be "Type", not just any string. This was mentioned in the docs, but it's not really clear. The QtCentre link also mentioned this. I've decided to accept Kaleb Pederson's answer because it is my fault that I found the answer the hard way. :)</p>