Yes, you need to derive from QAbstractItemModel since you need a tree model.

The model for one data type needs a reference or pointer to the respective arrays, them build some lookup.
E.g. a map with the keys being the "namespace" parts and the value being the index into the array.

QModelIndex for a top level item is the the "n-th" key, etc.

Cheers,
_