Quote Originally Posted by hiead View Post
My issue is I'm not entirely sure how to add a separate branch to the end of the QFileSystemModel. I understand that I should use a proxy model, and set its source to my QFileSystemModel subclass.
Well, since you already have a QFileSystemModel subclass, you could also implement that in there.
Has the advantage that you can use QModelIndex instances of the base class as-is and only need to provide new ones for your additional data. In a proxy you always need to map between source model indexes and your own.

Quote Originally Posted by hiead View Post
So far I know I need to override rowCount() (to return sourceModel's rowCount+1 from the root node, and # of rows within the branch). I know I would have to override index() to return an index for each extra item, and obviously data(), but this is what gets me, as I don't know exactly how to work the rest. I'm also not sure how to handle the fact that a QFileSystemModel's data is prone to random change in row counts as files are added and deleted.
Every model has signals that are emitted before and after such changes as rows being added, etc. This is how the view knows when to update itself.

In case of using a proxy model you would connect to the source model's signals, usually in an overwritten implementation of setSourceModel().

If you go for adding your data inside your QFileSystemModel subclass, then you most likely don't have to do that, because your data is always "after" the base class data.
So all signals will have proper row values already and whenever rowCount() is called for the top level it is always that of the base class plus your entry.

Cheers,
_