title: Exposing QList<customobj *> to QML
body: <p>I am trying to expose <code>QList</code> with custom objects (<code>Sample</code>) into QML. Whenever I store those custom objects (they inherits form QObject) into <code>QList&lt;QObject *&gt;</code>, they show up, but without info, but when I try expose them as a  <code>QList&lt;Sample *&gt;</code>, they don't.</p>
  
  <p><strong>sample.h</strong></p>
  
  <pre><code>class Sample : public QObject
  {
      Q_OBJECT
      Q_PROPERTY(QString getVar READ getVar WRITE setVar NOTIFY varChanged)
  public:
      explicit Sample();
  
      //! Returns var
      QString getVar() const { return var; }
  
      //! Sets var
      void setVar(const QString &amp;a);
  
  signals:
      varChanged();
  
  protected:
      QString var;
  };
  </code></pre>
  
  <p>Class containing list looks like this</p>
  
  <p><strong>samplecontrol.h</strong></p>
  
  <pre><code>class SampleManager : public QObject
  {
      Q_OBJECT
      Q_PROPERTY(QList&lt;Sample *&gt; getSampleList READ getSampleList NOTIFY sampleListChanged)
  public:
      SampleManager(const QString &amp;path);
  
      //! Returns sample list
      QList&lt;Sample *&gt; getSampleList() const { return sampleList_; }
  
  signals:
      sampleListChanged();
  
  protected:
      QList&lt;Sample *&gt; sampleList_;
  };
  </code></pre>
  
  <p>I am setting context with</p>
  
  <pre><code>view_-&gt;rootContext()-&gt;setContextProperty("slabGridModel", QVariant::fromValue(samplecontrol.getSampleList()));
  </code></pre>
  
  <p>As I said, when i tired</p>
  
  <pre><code>QList&lt;QObject *&gt; datalist;
  datalist.append(sampleManager.getSampleList().first());
  datalist.append(sampleManager.getSampleList().last());
  </code></pre>
  
  <p>it worked. How can I make it work with <code>QList&lt;Sample *&gt;</code>?</p>
  
  <p>Thanks for your help!</p>