Hello!!

I'm trying show a class inherent of QStandardItemModel in listView of QML, as follow:

main.cpp
Qt Code:
  1. QDeclarativeView view;
  2. QDeclarativeContext *ctxt = view.rootContext();
  3. ctxt->setContextProperty("myModel", w.getModel());
To copy to clipboard, switch view to plain text mode 

main.qml
Qt Code:
  1. import QtQuick 1.1
  2.  
  3.  
  4. Rectangle
  5. {
  6. width: 240; height: 200
  7. ListView
  8. {
  9. width: 240; height: 200
  10. model: myModel
  11. delegate:
  12. Text {
  13.  
  14. text: " - " + display //is roles[Qt::DisplayRole] = "display"
  15. }
  16. }
To copy to clipboard, switch view to plain text mode 

w.getModel() is a (QStandardItemModel*) that has a "list" of QStandardItem with childs, but in ListView of qml file, is only showing QStandardItem parents, How I can show all QStandardItem and childs in ListView? and by the other hand, Is posible pass a QItemDelegate to ListView ( Delegate: )?

Thanks!