At the moment your model is flat and you can access any item with (row, column), thus your createIndex function can be very simple. If you're intending to make a truly hierarchical model, that won't be enough, though and you will have to store more information in the QModelIndex::internalPointer(). For example you could store a pointer to the parent item.
If you really need a hierarchical model I suggest you take look at the Simple Tree Model Example. Otherwise it will be a lot easier to go with the QAbstractTableModel as jpn suggested.
Bookmarks