It depends whether you want to implement a model from scratch or use one of the already existing. For the former you can do what you want. For the latter I suggest you just use QStandardItem objects or similar. How much data do you want to store in each node and do you already have some representation of the data tree anywhere?
Bookmarks