Greetings,

Idea is to have something like:

> File
.........New
.........Save
>Edit
.........Cut


I have:

Qt Code:
  1. int main( int argc, char *argv[] )
  2. {
  3. .........
  4.  
  5.  
  6. QStandardItem *parentItem0 = model.invisibleRootItem();
  7.  
  8.  
  9. QStandardItem *file_item = new QStandardItem(QString("File"));
  10.  
  11.  
  12. QStandardItem *new_ = new QStandardItem(QString("New"));
  13.  
  14. file_item->setChild(1, new_);
  15.  
  16.  
  17. parentItem0 = file_item;
  18.  
  19.  
  20. parentItem0->appendRow( file_item );
  21.  
  22. ..........
  23. }
To copy to clipboard, switch view to plain text mode 
This is not giving me anything.
What is the way to add child items to parent items?