Question: I'm fairly new to Qt and therefor try to find out how things are working. Especially for QTreeView this seems to be quite difficult: the documentation and the example that come from Qt are (at least for me) more or less cryptic. I'd guess one will understand this documentation only when one already knows how it works.

So: could someone give an example or an link to an example which is beginner-suitable and demonstrates the usage of QTreeView? Means which demonstrates how to add a node and some child nodes to it?

Thanks!

Answer: 
Maybe [this mini example](http://www.java2s.com/Code/Cpp/Qt/QTreeViewdemoandQStandardItem.htm) can help you. 

But to understand it you have to grasp the Model-View concept. The idea is that you **don't** add to the view, you add to the model and the view updates itself.
You can start with the combination of `QStandardItemModel` and `QTreeView`.

Set the proper row and column count of your model by `QStandadItemModel::setRowCount()` and `QStandardItemModel::columnCount()`.

Then you can insert a QStandardItem instance into the particular cell of the model with the `QStandardItemModel::setItem()`.

`QStandardItem` has a similar interface to `QStandardItemModel` for creating child rows and columns and inserting a child items: `QStandardItem::setRowCount()`, `QStandardItem::setColumnCount()` and `QStandartItem::setChild()`.

I can prepare an example if you need one.