In our application, we need to display a GridView wich contains some elements of custom type OverviewEntry and in these elements, we have a QList of element of custom type ChannelEntry.

Some code is more usefull than a long description so, please found the related code (simplified, of course) :

Qt Code:
  1. //Main.cpp
  2.  
  3. ...
  4. m_viewer = new QQuickView();
  5. ...
  6. QList<ChannelEntry *> channels;
  7. for (int i=0; i<5; i++) {
  8. for (int j=0; j<4; j++) {
  9. channels.append(new ChannelEntry("foo"));
  10. }
  11. m_overviewList.append(new OverviewEntry("bar", channels));
  12. }
  13. ...
  14. QQmlContext *ctxt = m_viewer->rootContext();
  15. ctxt->setContextProperty("overviewModel", QVariant::fromValue(m_overviewList));
  16. ...
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //OverviewEntry.h
  2.  
  3. class OverviewEntry : public QObject
  4. {
  5. Q_OBJECT
  6. Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
  7. ...
  8. Q_PROPERTY(QList<ChannelEntry> channels READ channels WRITE setChannels NOTIFY channelsChanged)
  9. ...
  10. QString m_name;
  11. QList<ChannelEntry *> m_channels;
  12. };
  13.  
  14. Q_DECLARE_METATYPE(QList<ChannelEntry>)
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //ChannelEntry.h
  2.  
  3. class ChannelEntry : public QObject
  4. {
  5. Q_OBJECT
  6. Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
  7. ...
  8. QString m_name;
  9. };
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //Main.qml
  2.  
  3. ...
  4. GridView {
  5. model: overviewModel
  6. delegate : OverviewEntry {}
  7. }
  8. ...
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //OverviewEntry.qml
  2.  
  3. ...
  4. Text{
  5. text: modelData.name
  6. }
  7. ...
  8. ListView {
  9. model: modelData.channels
  10. delegate : ChannelEntry {}
  11. }
  12. ...
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //ChannelEntry.qml
  2.  
  3. ...
  4. Text{
  5. text: modelData.name
  6. }
  7. ...
To copy to clipboard, switch view to plain text mode 

My GridView is well populated but my ListView remains empty... Even after 2-3 days of trying different approach...

So what am I missing ? Anyone has a clue, please ?