How can I make this:

|-parent0
--child0
--child1
|-parent1

The code for adding the parents is

Qt Code:
  1. model.appendRow(QStandardItem("parent0"))
  2. model.appendRow(QStandardItem("parent1"))
To copy to clipboard, switch view to plain text mode 

and for the childs?

I have this and I'm not sure that it's working:

Qt Code:
  1. model.item(0).apprenRow(QStandardItem("child0"))
To copy to clipboard, switch view to plain text mode 

Thanks