title: Accessing C++ QLists from QML
body: <p>If I've got a list of things in C++, how do I expose that to QML (in Qt5 / QtQuick 2)? It seems like QML can only understand <code>QObject</code>-derived classes, which is an issue because <code>QObject</code>s can't be put in a <code>QList</code> or copied. How do I do this:</p>
  
  <pre><code>struct Thing
  {
      int size;
      QString name;
  };
  
  class ThingManager : public QObject
  {
      Q_OBJECT
  
      // These macros support QtQuick, in case we one day want to use it to make a slick
      // interface (when QML desktop components are released).
      Q_PROPERTY(QList&lt;Thing&gt; things READ things NOTIFY thingssChanged)
  
  public:
      // ...
      QList&lt;Thing&gt; things() const;
  
      // ...
  
  };
  </code></pre>
  
  <p>So that I can do something like this in QML:?</p>
  
  <pre><code>var a = thingManager.things[0].name;
  </code></pre>