Thanks, this is exactly what I was looking for...!
After reading and re-reading the documentation and examples, I am confused about a couple points:
It seems that I can just subclass QFSFileEngine... let's call it "RemoteFileEngine". So I can infer that I will need at least three classes:
RemoteFileEngine
RemoteFileEngineHandler
RemoteFileEngineIterator
where the iterator is the entry point to the virtual file system listings. (ie, iterator returns the beginning of a dirlisting for beginEntryList, which QFileDialog uses to populate itself). The Handler creates engine items and the Engine does all the other work.
But after attempting to subclass I find that QFSFileEngine has methods scattered all over that reference the local file system, and it's kind of difficult to separate, or rather, override all the functions that talk to the local file system (the whole listing should be virtual, served by the server).
I am forced to conclude that I have to subclass QAbstractFileEngine instead, but there appears to be about 20 virtual functions, and certain private variables that I'll need to create. The source is kind of obfuscated for QFSFileEngine, so it's difficult to use this as a starting place. Is there an example somewhere, or a list of the minimum methods needed to successfully subclass?




Reply With Quote



Bookmarks