You have to reimplement all methods that might want to try accessing internal data through the index unless you can craft the internal representation as well (and return it using createIndex()). For instance, if you wanted to add "My Documents" entry to the model, you could fetch an index of the real path to My Documents, access its internal pointer and use it with your index. That could have a chance to work. Otherwise it might be simpler to add items by implementing a simple proxy model so that the original dir model remains stable.
Bookmarks