title: Access QList object in QML
body: <p>I have a little problem accessing a QList objects since Javascript. I have a C ++ class that allows me to perform SQL queries since QML / JS. Everything works, I get my results in C ++.</p>
  
  <p>My problem is that I'd returned to QML an QList object.
  This is my function in C++ to return SQL result (Note is a simple object with different attributes) :</p>
  
  <pre><code>QList&lt;Note&gt; Storage::setQuery(QString query)
  {
      QList&lt;Note&gt; noteItems;
      QSqlQuery qsqlQuery;
      bool ok = qsqlQuery.exec(query);
      if(!ok)
      {
          qDebug() &lt;&lt; "Error setQuery" &lt;&lt; m_sqlDatabase.lastError();
      }
      else
      {
  
          while (qsqlQuery.next()) {
              Note my_note;
              QString note = qsqlQuery.value("message").toString();
              my_note.setMessage(note);
  
              noteItems.append(my_note);
          }
     }
  
     return noteItems;
  }
  </code></pre>
  
  <p>But when I call this function from JS I get this error: <code>Unknown method return type: QList&lt;Note&gt;</code>
  The problem is the return type, QML JS doesn't know the type <code>QList&lt;Object&gt;</code>, why? What do I do wrong </p>