title: Storing custom objects in QStandardItemModel
body: <p>I'd like to store custom objects (let's say instances of MyDataClass) in a tree structure, and linked with a view. So I used QStandardItemModel. I think that MyDataClass should inherit from QStandardItem :</p>
  
  <pre><code>class MyDataClass : public QStandardItem
  {
  public:
      MyDataClass(QString name)
  private:
      vector&lt;float&gt; someData;
  }
  </code></pre>
  
  <p>But I cannot figure out how to store instances of this class in a <code>QStandardItemModel</code>.
  I tried <code>QStandardItem.setChild</code> and then <code>appendRow</code> but it does not work and I think I don't really get the QStandardItemModel thing.
  I think that the solution deals woth <code>QStandardItem.setData</code> but I cannot figure out how it works for custom objects.</p>